Submenu trouble after V5 conversion

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
georgi
Advanced
Advanced
Posts: 11
Joined: Thu Sep 18, 2003 10:48 pm

Submenu trouble after V5 conversion

Post by georgi »

I'm experiencing a problem with version 5 which did not occur with ver 3. Sometimes the submenus stay displayed after they should be turned off.

For example on my test page:
http://cfdev.rsna.org:81/index-milonic5.htm

If I mouseover the Interventional Rad button in the left navigation column, and then move the mouse to the right to "procedures & treatments" a submenu pops up beginning with "Angioplasty and Vascular Stenting". If I then move the mouse over any menu item in that submenu without actually clicking on anything and then move the mouse directly to the Diagnostic Rad button in the left Nav column, the submenu beginning with "Angioplasty and Vascular Stenting" may still be displayed - it should not be. This does not happen consistently, it seems random, and it happens randomly with other submenus as well.

My menu data file is at:
http://cfdev.rsna.org:81/milonic_v5/menu_data_v5.js

Any suggestions?
Thanks
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I've experienced eratic behavior when the text width is longer than the itemwidth, the obvious would be the delay to close at the top of menu-data.

I'm sure the moderators will be here soon...
unless they are hiding from Isobel, the hurricane.
Regards
maz
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Couple things...
Put your _menuOpenDelay back to 100, you have it set to 150. Usually I would say to change it because its more personal preference but since this seems like it COULD be a timing issue, use the defaults.

Secondly, alot of your menus have an attribute that says alignment="left". There is no such attribute by that name anywhere in the menu that I can find. At the menu level, there isnt even an align property. Styles can have an align propery set which is a global way of setting the text alignment in each individual menuitem. And each menuitem has an align property that allows you to change the text alignment on a per-item basis. But there is no 'alignment' from what I can see, and nothing even pertaining to alignment should be listed in the menu declaration itself, only in the style OR a menuitem.

Give those two things a shot and see what happens. BTW good job explaining the problem, it means a ton when people can do that well! ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
georgi
Advanced
Advanced
Posts: 11
Joined: Thu Sep 18, 2003 10:48 pm

Post by georgi »

Thanks Hergio, I set the _menuOpenDelay to 100 and deleted all the alignment=Left attributes but the menu sitll behaves the same way.

Regarding Maz's response about "erratic behavior when text width is longer than the itemwidth", I tried increasing itemwidths but that didn't seem to help either.

Any additional suggestions?
Thanks very much.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok I am going on a hunch here. I see you are calling your menus from table items using the popup() and popdown() methods. The reason I THINK you are getting the error is because the other menus are still open when you mouse over the table cells and the popup method is being called when other menus are still open. So in the onMouseOver event of your three left table cells make them look like below and see if that works.

Code: Select all

...
onMouseOver="popdown();popup('ir');MM_swapimage();"
...
This way all menus on the page will be killed before any new ones are rendered...it MAY help....let me know! I'm interested to know if it'll work.
Last edited by Hergio on Wed Oct 08, 2003 8:34 pm, edited 1 time in total.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
georgi
Advanced
Advanced
Posts: 11
Joined: Thu Sep 18, 2003 10:48 pm

Post by georgi »

Thanks for the suggestion, but adding onmouseover="popdown();" doesn't help. The original problem still occurs and this addition sometimes causes the 1st popout menus to disappear around a second after you mousover the graphic button. It is preferred that the menus remain visible as long as the mouse is positioned over the graphic button. Besides, shouldn't having the popdown method in the onmouseout event (as I have it) kill any open menus?

A revised test page with your suggested changes is posted at:
http://cfdev.rsna.org:81/test-milonic5.htm

Any other ideas?

Also FYI, it appears that the popdn(); method (referenced in your sample code and used in version 3) was changed to popdown(); in version 5.

Thanks again for your help.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok, bad idea on the popdown thing. I just thought just maybe it might do the trick, ah well. And yes, sorry about that mistake on popdn, slight brain-hiccup there.

I downloaded your entire code to my server, and tried it. I am using RC10 at the moment, (you are using RC11) and I had experienced the same problems as you did. I tried descreasing the close menu delay to see if that might help it, but with no luck. I noticed if you drag your mouse to the left from the 2nd sub, to the 1st sub, and then onto the main menu, it works fine if you got at normal speed. Its when you whip straight across and get back to the main menu before the outtermost menu really gets a chance to close completely. I have come to the conclusion that popup may be the culprit here...Andy will have to take a look. Andy?
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

I've got it, it's a very tiny bugette.

The popup function isn't re-setting the mouseOut timer, this is why the menu will sometimes display a sub menu when it should have cancelled it.

The best way to see the problem is to jump from one of the popup images to a menu and then back to the popup, if you are quick enough you'll see the second menu appear. Increasing _menuOpenDelay will exaggerate this.

The fix will be in the next release, unless you need it sooner and I'll post one up. Let me know ;)

Cheers
Andy
georgi
Advanced
Advanced
Posts: 11
Joined: Thu Sep 18, 2003 10:48 pm

Post by georgi »

Thanks Andy; Yes if you could please post the bug fix as soon as possible and let me know when it's available I'd appreciate it very much.
Thank you! :P
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

The new download should contain the fix.

Let me know if you have any trouble with it.

cheers
Andy
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

AGAIN!

Post by Hergio »

HOT DANG, HE DOES IT AGAIN! Nice job Andy, thanks again for all the work you're puttin into this thing!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
georgi
Advanced
Advanced
Posts: 11
Joined: Thu Sep 18, 2003 10:48 pm

Post by georgi »

Looks good. Thanks for the quick response! :P
Post Reply