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

Displaying a menu by default


Poster: mofo
Dated: Monday September 8 2008 - 22:35:14 BST

I am using the menu with an imagemap and it works fine.
<area onMouseOver="popup('Research',1); shape="poly" coords="95,25,95,2,225,2,224,24,97,22,230,24" href="#" />
<area onMouseOver="popup('Academics',1); shape="poly" coords="95,25,95,2,225,2,224,24,97,22,230,24" href="#" />
(...)
I would like the menu to open on the correct tab when the user loads a page, so I tried to add the "popup" method to the OnLoad event of the body tag but it did not work. I also tried putting it inside the HTML code below the imagemap and at the end in a <script type="text/javascript"> tag but it did not work either. Note that I tried replacing the popup method by a debug function like "alert('debug') and it worked correctly.

Is there anything I should know about the loading of the menu that would explain why it works fine in the onMouseOver event and not in the other places I tried.

I also tried to use the alwaysvisible property but it was overlaping with the other menus when I rolled over them...

Thanks for your help.

Re: Displaying a menu by default


Poster: mofo
Dated: Tuesday September 9 2008 - 18:53:17 BST

I ended up launching the popup method in a timer "setTimeout(popup('Student',1),60);" that I embedded at the end of the HTML code. This only worked if I set enough time for the page to display completely (40-60ms depending on the page and computer).

Re: Displaying a menu by default


Poster: Ruth
Dated: Wednesday September 17 2008 - 23:59:37 BST

Hi,

Could you give me a page so I can see what you want and have a page to test?

There is a module called openmenusbyurl.js which opens a menu based on the url matching, however I do not know if that works with the imagemap and I'd need a page to test it.

Ruth