PDA

View Full Version : Javascript swap image function not working in Firefox..Need assistance..



alphauser51
07 Feb 2010, 01:18 AM
I have a small website where I sell various 3d products, and Im in the process of updating
the product pages. A programmer friend worked up a simple javascript solution for
displaying product images. The problem is, it works fine in Internet Explorer, but doesnt
work in Firefox. No errors, it just doesnt work. Im not a programmer,I can barely do HTML. I was hoping someone could give me assistance.
You can check out the page in question at www.es3d.com/testbin.
Any help would be appreciated..

The code is :



<script language="javascript">
function swapImage(img_src)
{document["main"].src=img_src;}
</script>

<img name="main" src="warkevlarmain.png" />

<img src="wartemmainpthumb1.png" onclick="swapImage('warkevlarmain.png');"/>

<img src="wartemmainpthumb2.png" onclick="swapImage('warkevlarmain2.png'); "/>

<img src="wartemmainpthumb3.png" onclick="swapImage('warkevlarmain3.png');"/>