View Single Post
Old 06-16-2009, 12:52 PM   #2 (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
you need to change the target, so your function would become:
Code:
function changeImage(filename, target) { document.target.src = filename; }
and in your file:
Code:
<p align="center"> <img name="mainimage" src="DSCF2715.JPG"></p> <p align="center">Images: <a href="javascript:changeImage('DSCF2715.JPG', 'mainimage')">1</a> <a href="javascript:changeImage('DSCF0605.JPG', 'mainimage')">2</a> <a href="javascript:changeImage('image3.jpg', 'mainimage')">3</a> <a href="javascript:changeImage('image4.jpg', 'mainimage')">4</a> <a href="javascript:changeImage('image5.jpg', 'mainimage')">5</a></p> <p align="center"> <img name="mainimage2" src="DSCF2715.JPG"></p> <p align="center">Images: <a href="javascript:changeImage('DSCF2715.JPG', 'mainimage2')">1</a> <a href="javascript:changeImage('DSCF0605.JPG', 'mainimage2')">2</a> <a href="javascript:changeImage('image3.jpg', 'mainimage2')">3</a> <a href="javascript:changeImage('image4.jpg', 'mainimage2')">4</a> <a href="javascript:changeImage('image5.jpg', 'mainimage2')">5</a></p>
I think this should do it
__________________
...to be continued
Costin Trifan is offline   Reply With Quote