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

Menu Loaded/onLoad switch?


Poster: TypicalHuman
Dated: Friday January 28 2005 - 20:23:46 GMT

I'm having a problem on http://www.ironwoodadvisory.com when user manages to call popup() function or something like that before menu is loaded. (Resulting in Object expected error to appear)

I know that a 200ms delay would probabally work, but seems pretty hack to me.

Is there a global variable that is defined as soon as the menu is loaded, or do I have to do something like wrap the popup() function with an onload switch?

Thanks!


Poster: Ruth
Dated: Friday January 28 2005 - 20:37:25 GMT

There is a buildAllMenus parameter which is a global property and goes up at the top. Menu Quick Reference Guides - Global Properties The explanation is about half-way down. There is also a preloadmenuimages.js module.

Ruth


Poster: TypicalHuman
Dated: Monday January 31 2005 - 20:22:07 GMT

Hmm, your answer doesn't seem to address the problem I'm having.

Problem: If a user tries to drop down a menu before the menu is finished loading, I get an Object Expected error. User drops menu by rolling over an image that calls popup() onmouseover.

Like I said, I'd guess the error is because the user can call popup() function before it is defined (by loading the .js include files).

Is there any way, other than wrapping that function, that I can prevent this from happening?


Poster: TypicalHuman
Dated: Monday January 31 2005 - 21:15:47 GMT

Ok, seems like the answer was the ignoreCollisions = true; config.

Not really sure what a "collision" is or how it is caused though, any thoughts?


Poster: TypicalHuman
Dated: Monday January 31 2005 - 21:16:59 GMT

Ha, living up to my name .. I tricked myself. Same problem, start again.


Poster: TypicalHuman
Dated: Monday January 31 2005 - 21:27:34 GMT

Got it .. problem was that somehow the javascript had ended up in the body tag below images and href that I use to drop the submeuns.

I moved the .js includes into the head and now cannot reproduce the problem (i.e. fixed).

-e


Poster: Ruth
Dated: Monday January 31 2005 - 22:53:21 GMT

Glad you got it fixed. Sorry, if I misunderstood. I thought that having buildAllMenus would mean that the menu wouldn't be available until all of it was there.... :?

Ruth