cascademenu.js problem with Mozilla vs IE

C

Curtis Rempel

I'm using the cascademenu.js file from

http://javascript.internet.com/navigation/cascade-menu.html

It works fine with IE but nothing happens with Mozilla. Specifically,
when I open the Javascript Console with Mozilla, I get "menuBar is not
defined".

Can anybody tell me why?

Alternatively, can anybody suggest an equivalent menu script that does
work with Mozilla and IE?

Thanks!
 
L

Lasse Reichstein Nielsen

Curtis Rempel said:
I'm using the cascademenu.js file from

http://javascript.internet.com/navigation/cascade-menu.html ....
I get "menuBar is not defined".
Can anybody tell me why?

They are expecting the element with id="menuBar" to be available as a
global variable of that name. IE is one of the only browsers that makes
it available like that. The correct method of accessing such an element
is with document.getElementById("menuBar").

That means that the script is written specifically to IE. Making it work
in other browsers can be problematic. I recommend finding another.
Alternatively, can anybody suggest an equivalent menu script that does
work with Mozilla and IE?

.... but I'm not familiar with one.

/L
 
C

Curtis Rempel

Lasse said:
They are expecting the element with id="menuBar" to be available as a
global variable of that name. IE is one of the only browsers that makes
it available like that. The correct method of accessing such an element
is with document.getElementById("menuBar").

That means that the script is written specifically to IE. Making it work
in other browsers can be problematic. I recommend finding another.




... but I'm not familiar with one.

/L

Ah yes, another case of the M$ "embrace and extend" mantra. Sigh.

Thanks for the info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,951
Messages
2,570,113
Members
46,698
Latest member
alexxx

Latest Threads

Top