Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:42

Need delay in opening main menu


Poster: maditya
Dated: Tuesday February 17 2004 - 17:09:45 GMT

Hi, I'm using version 5.0 and needs the main menu to have a slight delay before dropping down. I've changed the var _menuOpenDelay (on menu_data.js) but no effect. Is menu_data.js the only place I need to modify _menuOpeDelay? If so, how do I make it work?

Thanks,
Mike

Re: Need delay in opening main menu


Poster: John
Dated: Tuesday February 17 2004 - 17:31:55 GMT

maditya wrote:
Hi, I'm using version 5.0 and needs the main menu to have a slight delay before dropping down.

I assume you mean before the subs drop down, correct?
maditya wrote:
I've changed the var _menuOpenDelay (on menu_data.js) but no effect. Is menu_data.js the only place I need to modify _menuOpeDelay? If so, how do I make it work?

Yes, that's the only place. Keep making it bigger until you get the effect you want. Mine is at 750, for example (3/4 second).


Poster: maditya
Dated: Tuesday February 17 2004 - 18:02:13 GMT

Thanks for your reply. Yes. I meant delay before the subs drop down. I've made it bigger but it doesn't take. It works when I changed _menuCloseDelay, just for testing, but not for _menuOpenDelay. Any ideas?


Poster: John
Dated: Tuesday February 17 2004 - 18:14:00 GMT

None offhand. I just went into mine and made some radical changes (both short and long), and the menu did what it was told.

Got a URL?


Poster: maditya
Dated: Tuesday February 17 2004 - 18:29:17 GMT

URL: http://www.chicagocityblessing.org/temp/menutest.html

_menuOpenDelay is at 3000 but no delay.


Poster: John
Dated: Tuesday February 17 2004 - 18:50:22 GMT

A few things (just because I have a headache and feel like being picky)...

1. Upgrade! You're running RC31, we're now at 5.02 FINAL release. That puts you way back.

2. Take the ; off of the 3000. You have _menuOpenDelay=3000; - should be _menuOpenDelay=3000

3. Menu items that are not used can be left out of the code; e.g., separatorcolor="";. Just dump it.

4. HTML-picky - tags should be closed in the opposite order they are opened. You have...
Code:
aI("text=<b><u>Travel Planning</b></u>;url=;");

Should be...
Code:
aI("text=<b><u>Travel Planning</u></b>;url=;");

<b> is being depreciated by the W3C, so the above should actually be...
Code:
aI("text=<strong><u>Travel Planning</u></strong>;url=;");


Poster: Andy
Dated: Tuesday February 17 2004 - 19:42:49 GMT

The delay only works for child menus being opened from a parent menu.

As you are using the popup, the openMenuDelay value will have no effect.

This is a custom function that will open a menu, using popup() with a delay.

Code:
<script>
function delayedPopup(_menu,_delay,_img) {
   args=arguments
   _newPopup="popup('"+args[0]+"')"
   if(args[2])   {
      _newPopup="popup('"+args[0]+"','"+args[2]+"')"
      
   }
   setTimeout(_newPopup,_delay)
}
</script>


You then need to call the menu using:

Code:
onmouseover="delayedPopup('TravelPlanning',800,'TravelPlanningmenu')"


Hope this helps
Andy


Poster: maditya
Dated: Tuesday February 17 2004 - 19:53:50 GMT

Thank you very much John and Andy! The menu delay works now.


Poster: maditya
Dated: Monday February 23 2004 - 15:50:15 GMT

Hi,

Now that I have the delay working, the menu doesn't seem to close properly. If you just mouseover the main menu without focusing on it, the menu drop downs but won't close until you mouseover the submenus.
I've set the _menuCloseDelay=0 but no effect.

URL: http://www.chicagocityblessing.org/temp/menutest.html

Any ideas? Thanks!


Poster: Maz
Dated: Monday February 23 2004 - 16:29:40 GMT

I don't know javascript but I think the logical solution is to repeat popup for popdown.

Instead of using html tags in text, you could use style tags in the menu item like fontweight=bold;

maz