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

test to see if menu is showing

Poster: Mrfunkleberry
Dated: Saturday May 14 2005 - 23:17:36 BST

How can i test to see if a menu if showing?

i think need to search through _m
and return 'menu1' or 'menu2' etc
if that menu is showing.

Can't seem to find a good description of _m
but i assume its stored in there somewhere _m[?]

any help?

This is the last thing i have to do before i have an Iframe/ie/firefox/safari compatable menu (taken me all day!)

Poster: Ruth
Dated: Sunday May 15 2005 - 4:39:12 BST

I'm not sure what you mean. I would put it no the web and and go to the site and see if it's there.


done it...

Poster: Mrfunkleberry
Dated: Sunday May 15 2005 - 8:20:28 BST

found it...

if (_m[_a][7] == 1) { activemenu = _a; }

Poster: John
Dated: Monday May 16 2005 - 16:45:34 BST

Ruth is correct - just post the page and see what you get. There is no reason to be messing with the code, which will void all support.

Poster: kevin3442
Dated: Tuesday May 17 2005 - 1:06:13 BST

Hi Mr. Funkleberry,

Mrfunkleberry wrote:
How can i test to see if a menu if showing?

I think my friends may have misunderstood... understandable given the phrasing of the question. You don't mean that you want to see for yourself if the menu is visible on a page. You mean that you want to programatically test to see if a given menu, at a given time, is open or not.

Unfortunately, I think you're on the wrong track (you may have discovered this by now). _m[7] represents the menu's [i]alwaysvisible property, which essentially determines whether a menu is treated as a "main" menu (i.e., one that is always open) or not. if _m[i][7] is 1 or true, then the menu is always visible.

I recall doing a similar test some time ago. I think I got the menu object for the menu in question, then tested it's visibility attribute. I'll dig around and see if I can find the code I used and post it.



Poster: kevin3442
Dated: Tuesday May 17 2005 - 1:37:33 BST

Hi Again,

Here is the thread I was thinking of. The mm_isOpen() function is what I had in mind. It worked then. Don't see why it wouldn't work now, although I can't swear to what browsers it'll work with. You may want to test it in all of your target browsers and tweak as needed.

Hope that helps,