PDA

View Full Version : document.getElementById(menu);


AaronCampbell
02-27-2004, 07:10 PM
I have a javascript file that I use to place my menus on the page. Part of that is this line:
var menuID = document.getElementById(menu);

Then I use menuID like this:
menuID.style.left = offsetLeft+adjLeft;

The code works perfectly in MS, but in Mozilla FireFox, it gives an error. Is there a way to fix that?

Jon Hanlon
02-27-2004, 08:16 PM
Does Mozilla FireFox support the left property?
It's CSS2 so I doubt it.

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/left.asp

Try doing
alert(menuID.style.left)

and see what happens.