Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:11
Submenu trouble after V5 conversion
Poster: georgi
Dated: Friday September 19 2003 - 16:03:40 BST
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
Poster: Maz
Dated: Friday September 19 2003 - 17:29:51 BST
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
Poster: Hergio
Dated: Friday September 19 2003 - 19:34:44 BST
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!
Poster: georgi
Dated: Friday September 19 2003 - 21:48:25 BST
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.
Poster: Hergio
Dated: Saturday September 20 2003 - 5:01:11 BST
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:
...
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.
onMouseOver="popdown();popup('ir');MM_swapimage();"
...
Poster: georgi
Dated: Monday September 22 2003 - 16:02:32 BST
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.
Poster: Hergio
Dated: Monday September 22 2003 - 19:28:23 BST
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?
Poster: Andy
Dated: Wednesday September 24 2003 - 16:12:51 BST
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
Poster: georgi
Dated: Wednesday September 24 2003 - 16:27:22 BST
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!
Poster: Andy
Dated: Wednesday September 24 2003 - 16:31:14 BST
The new download should contain the fix.
Let me know if you have any trouble with it.
cheers
Andy
AGAIN!
Poster: Hergio
Dated: Wednesday September 24 2003 - 18:02:40 BST
HOT DANG, HE DOES IT AGAIN! Nice job Andy, thanks again for all the work you're puttin into this thing!