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!)
test to see if menu is showing
-
- Beginner
- Posts: 7
- Joined: Sat May 14, 2005 12:56 pm
- Contact:
-
- Beginner
- Posts: 7
- Joined: Sat May 14, 2005 12:56 pm
- Contact:
done it...
found it...
for(_a=1;_a<_m.length;_a++)
{
if (_m[_a][7] == 1) { activemenu = _a; }
}
for(_a=1;_a<_m.length;_a++)
{
if (_m[_a][7] == 1) { activemenu = _a; }
}
Hi Mr. Funkleberry,
Unfortunately, I think you're on the wrong track (you may have discovered this by now). _m[7] represents the menu's 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[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.
Cheers,
Kevin
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.Mrfunkleberry wrote:How can i test to see if a menu if showing?
Unfortunately, I think you're on the wrong track (you may have discovered this by now). _m[7] represents the menu's 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[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.
Cheers,
Kevin
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,
Kevin
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,
Kevin