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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script doesnt work in Netscape... WHO WANTS TO TRY? 1

Status
Not open for further replies.

sumilsay

Technical User
Feb 12, 2003
69
0
0
CA
hey peeps, i have a pretty simple script that changes an image source when a link is clicked. it works in explorer, but not in netscape.

here's the script:

this is in the <head>
<script type=&quot;text/javascript&quot;>
function changePic(source,w,h){
img.src=source;
img.width=w;
img.height=h;
}
</script>


and this is the link
<a href=&quot;javascript:changePic('../../../images/hay_forage/rbale_carrier/control.jpg',156,243)&quot;>
Link</a>


thanks everyone. PEACE!
 
oh ya, and here's my image code:

<img src=&quot;../../../images/hay_forage/rbale_carrier/control.jpg&quot; name=&quot;img&quot; id=&quot;img&quot; width=&quot;156&quot; height=&quot;243&quot;>
 
thanks greelmo, worked like a charm. i used:

document.img.src=source;
document.img.width=w;
document.img.height=h;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top