Connecting Tech Pros Worldwide Help | Site Map

cascademenu.js problem with Mozilla vs IE

Curtis Rempel
Guest
 
Posts: n/a
#1: Jul 20 '05
I'm using the cascademenu.js file from

http://javascript.internet.com/navig...cade-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!

Lasse Reichstein Nielsen
Guest
 
Posts: n/a
#2: Jul 20 '05

re: cascademenu.js problem with Mozilla vs IE


Curtis Rempel <curtis@telus.net> writes:
[color=blue]
> I'm using the cascademenu.js file from
>
> http://javascript.internet.com/navig...cade-menu.html[/color]
....[color=blue]
> I get "menuBar is not defined".[/color]
[color=blue]
> Can anybody tell me why?[/color]

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.
[color=blue]
> Alternatively, can anybody suggest an equivalent menu script that does
> work with Mozilla and IE?[/color]

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

/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Curtis Rempel
Guest
 
Posts: n/a
#3: Jul 20 '05

re: cascademenu.js problem with Mozilla vs IE


Lasse Reichstein Nielsen wrote:[color=blue]
> Curtis Rempel <curtis@telus.net> writes:
>
>[color=green]
>>I'm using the cascademenu.js file from
>>
>>http://javascript.internet.com/navig...cade-menu.html[/color]
>
> ...
>[color=green]
>>I get "menuBar is not defined".[/color]
>
>[color=green]
>>Can anybody tell me why?[/color]
>
>
> 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.
>
>[color=green]
>>Alternatively, can anybody suggest an equivalent menu script that does
>>work with Mozilla and IE?[/color]
>
>
> ... but I'm not familiar with one.
>
> /L[/color]

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

Thanks for the info.

Closed Thread