View Single Post
Old 06-16-2009, 02:44 PM   #4 (permalink)
Costin Trifan
Meeow!
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 3,235
iTrader: 0 / 0%
Latest Blog:
None

Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
The document.target.src throws an error. I didn't test it, I've just updated the code here, but now that I've tested on my machine, it works; so here's what you need to change in your code:

#1: give an ID to each image placeholder. you can use the name for the ID too ( so it will look like this: <img name="mainimage" id="mainimage" src="1.gif">)

#2 change the function to this:

Code:
<script type="text/javascript"> function changeImage(filename, target) { //document.target.src = filename; document.getElementById(target).src = filename; } </script>
__________________
...to be continued
Costin Trifan is offline   Reply With Quote