Onmouseover netscape problem

They have: 5,633 posts

Joined: Jan 1970

On my page i have a javascript which an image if the mouse goes over a link. it works great in IE but netscape gives me an error. i've been driving myself crazy trying to fix this but i haven't been able to. i would appreciate any help that anyone can give.
here's the url to my page: http://members.xoom.com/entropypage/main.html

They have: 231 posts

Joined: Feb 2000

The reason your image will not change in NN is because you are using layers (or DIV's). Netscape considers a layer as a document within a document so you must reference it like that.

eg.
document.layers[LAYER NAME].document.PROPERTY

Change the "change1" function to the following:

code:

function change1(picName,imgName) {
   if (document.all) {
      document.[picName].src = eval(imgName + ".src");
      }
   if (document.layers) {
      document.layers["message"].document[picName].src = eval(imgName + ".src");;
      }
   }[/code]

You could always achieve the same positioning effect without using absolutely positioned layers. You could either use a table or use images that piece together to make one big image.

This way older browsers will still see your site however the rollovers wont work.

[This message has been edited by Lloyd Hassell (edited 22 March 2000).] 

:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::

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.