Hi all, I hope this finds you all well!
I have a website that will need to handle about 20+ images per page, but for the sake of a clean layout I want them arranged so the user scrolls through a couple of tiny galleries instead of being presented with a long stream and having work their way through.
Code:
<script>
function changeImage(filename)
{
document.mainimage.src = filename;
}
</script>
<p align="center"> <img name="mainimage"
src="DSCF2715.JPG"></p>
<p align="center">Images: <a
href="javascript:changeImage('DSCF2715.JPG')">1</a>
<a href="javascript:changeImage('DSCF0605.JPG')">2</a>
<a href="javascript:changeImage('image3.jpg')">3</a>
<a href="javascript:changeImage('image4.jpg')">4</a>
<a href="javascript:changeImage('image5.jpg')">5</a></p>
That said, I've found an image click-through gallery script here... but it only seems to work once per page; any more times and those below the top click-through fail to work. How can this be manipulated in a way to be used several times loading different, pre-defined images?
ONLINE DEMONSTRATION:
http://i-code.co.uk/javascript/imageviewer.php
Your help on this matter will be
greatly appreciated!
Take care,
Jason