Mouse over works in IE, not NS

They have: 18 posts

Joined: Sep 1999

I have written a mouse over that works in IE but throws me an error in Netscape.

Here is the code:

<A HREF="history.htm" onMouseOver="document.menu.src='menu1.gif'" onMouseOut="document.menu.src='menu.gif'"><IMG SRC="No1.gif" BORDER=0 NAME="I"></img></a>

<img src="menu.gif" NAME="menu"></img>

The error tells me that 'menu' has no properties. I have many other mouse overs on that page which use the same method yet give me no errors. Your help please.

_Nathan.

They have: 19 posts

Joined: Oct 1999

The name of the image is "I" instead of menu so ya might try that, ie:
document.i.src

Hope this helpz!

They have: 18 posts

Joined: Sep 1999

Thanks kool dude but I found out what the problem was. My code was perfect, Netscape is not.

I removed everything form the page except the script. I found that I will get an error if I use absolute positioning or any css with the image.

I did many tests and the font tag was fine, but when I added <font style=, or ID= I would get the error.

I hate errors that are not my fault.

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Nathan,

I use absolute positioning with images in a division layer with no problem in either browser. ("dHTML: Moving Layers" script, my site)

Vinny GrassBlade: cut&paste javascript

Where the world once stood
the blades of grass cut me still

They have: 18 posts

Joined: Sep 1999

Yeah it works fine using absolute positioning when changing one image, but when I change two images with the one mouseover (technically two mousovers or one function ) then any css must go or I get 'whatever.scr has no properties'.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.