Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change an image in Netscape 6??

Status
Not open for further replies.

Boblevien

Technical User
Nov 3, 2000
38
GB
In IE I can write:

document.circles.src=eval("nav" + n + ".src");

to change the image of an element called circles - as in:

<img name=&quot;circles&quot; src=&quot;images/allnav.gif&quot;>

Can anyone tell me what the Netscape 6 equivalent is?

I’ve tried :

document.getElementById('circles').src=eval(&quot;nav&quot; + n + &quot;.src&quot;);
but no success.

Bob.
 
An image should be inside <A> tag, even if you don't use it as a hyperlink. If you don't want it to be a link, add href=&quot;#&quot; to it.
 
Hi,

Thanks for that, but it already was, also inside a <span> tag. I'm pretty sure the problem is with the NS6 DOM. I suspect that it doesn't like the .src part in

document.getElementById('circles').src=eval(&quot;nav&quot; + n + &quot;.src&quot;);

Any other suggestions gratefully received!

Bob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top