Hi there,
Hoping someone can offer a bit of help here.
I have one thumbnail that when clicked changes the main image. As it cycles through the images in the gallery things go fine, it gets to the last image and stops. How do I get it to go back to the first image instead of stopping?
(javascript for functions and main image)
<table border="0" cellpadding="0">
<tr>
<td width="100%"><img src="images/Brilliance1.
png" width="344" height="502" name="photoslider" /></td>
</tr>
<tr>
<td width="100%"><form method="POST" name="rotater">
<div align="center"><center><p><script language="JavaScript1.1">
var photos=new Array()
var which=0
/*Change the below variables to reference your own photos. You may have as many photos in the slider as you wish*/
photos[0]="images/Brilliance1.
png"
photos[1]="images/Brilliance2.
png"
photos[2]="images/Brilliance3.
png"
photos[3]="images/Brilliance4.
png"
photos[4]="images/Brilliance5.
png"
function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which]
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
}
else window.status='backward()'
}
</script></p>
</center></div>
</form>
</td>
</tr>
</table>
(and here is the thumbnail button)
<input type="image" src="images/BrillThumb.
png" width="88px" height="128px" name="B1" alt="Next Screenshot"
onClick="forward()">