Mouse over works in IE, not NS
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.
Kool Dude posted this at 03:28 — 20th February 2000.
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!
nathan posted this at 10:19 — 20th February 2000.
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 posted this at 18:18 — 20th February 2000.
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
nathan posted this at 04:55 — 21st February 2000.
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.