I know how to use buttons to go to the next and previous picture in
slide show, but i want to change it so when the user clicks the picture
instead of button, the script shows the next phicture.
How can i change it?
Any suggesstions?
Thanks!
<script language="JavaScript">
<!--
var x = 1
images = new Array
images[1] = "images/AidaL.jpg"
images[2] = "images/mclaren10S.jpg"
images[3] = "images/lotus6S.jpg"
images[4] = "images/SENNAS.jpg"
images[5] = "images/arytonsennaS.jpg"
//add additional images here as required
function backimg(){
if (x != 1){
document.image1.src = images[x-1]
x-- }
}
function fwdimg(){
if (x != 5){ //Change the 5 here to your total number
document.image1.src = images[x+1]
x++ }
}
// -->
</script>
<IMG SRC="images/AidaL.jpg" name="image1" border=0><br>
<a href="" onClick="backimg();return false;"><img src=sback.gif
border=0 width=30 height=16></a>
<A href="" onClick="fwdimg(); return false;"><img src="ssfwd.gif"
border=0 width=30 height=16></a>
--------------------------------------------------------------------------------