ComedyFarm
Technical User
I have copied and pasted Photoslider II onto my index page. It works fine but when I paste more than one everything gets screwed up. People suggest duplicate variables but nothing I do straightens the problems out. I am pasting the code below, hoping someone can tell me how specifically I need to make the changes so three of the same slideshows work on same page. I am by trade a comedy writer and definately not a programmer. (That's probably obvious.) Thanks for your help. I am also curious if it's possible to tweek the code so I can click on a thumbnail in the slideshow and a larger version of same pic appears in a separate pop up window. ComedyFarm
<table border="0" cellpadding="0">
<caption><strong>Kevin's pet dog</strong></caption>
<tr>
<td width="100%"><img src=" width="400" height="264" name="photoslider"></td>
</tr>
<tr>
<td width="100%"><form method="POST" name="rotater">
<div align="center"><center><p>
<script language="JavaScript1.1">
/*
Photo Slider II- By Kevin Adams (kadams70@hotmail.com)
For this script and more
Visit */
var photos=new Array()
var text=new Array()
var which=0
var what=0
//Change the below variables to reference your own images. You may have as many images in the slider as you wish
photos[0]="photos[1]="photos[2]="photos[3]="photos[4]="photos[5]="photos[6]="
//change coresponding description
text[0]="Libby watching another dog from the front porch"
text[1]="A calm moment. EXTREMELY RARE!"
text[2]="Curious as to what that flash was all about"
text[3]="Mad at Momma for taking pictures."
text[4]="Libby striking back!"
text[5]="They make messes and they lay in them."
text[6]="Libby catching a frisbee, Ministix following."
window.onload=new Function("document.rotater.description.value=text[0]")
function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which];
what--
document.rotater.description.value=text[what];
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
what++
document.rotater.description.value=text[what];
}
else window.status='End of gallery'
}
function type()
{
alert("This textbox will only display default comments")
}
</script>
<p><input type=text name="description" style="width:400px" size=50>
<p><input type="button" value="<<Back" name="B2"
onClick="backward()"> <input type="button" value="Next>>" name="B1"
onClick="forward()"><br>
<a href="#" onClick="which=1;what=1;backward();return false"><small>Start Over</small></a></p>
</center></div>
</form>
</td>
</tr>
</table>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="Kit</a></font></p>
<table border="0" cellpadding="0">
<caption><strong>Kevin's pet dog</strong></caption>
<tr>
<td width="100%"><img src=" width="400" height="264" name="photoslider"></td>
</tr>
<tr>
<td width="100%"><form method="POST" name="rotater">
<div align="center"><center><p>
<script language="JavaScript1.1">
/*
Photo Slider II- By Kevin Adams (kadams70@hotmail.com)
For this script and more
Visit */
var photos=new Array()
var text=new Array()
var which=0
var what=0
//Change the below variables to reference your own images. You may have as many images in the slider as you wish
photos[0]="photos[1]="photos[2]="photos[3]="photos[4]="photos[5]="photos[6]="
//change coresponding description
text[0]="Libby watching another dog from the front porch"
text[1]="A calm moment. EXTREMELY RARE!"
text[2]="Curious as to what that flash was all about"
text[3]="Mad at Momma for taking pictures."
text[4]="Libby striking back!"
text[5]="They make messes and they lay in them."
text[6]="Libby catching a frisbee, Ministix following."
window.onload=new Function("document.rotater.description.value=text[0]")
function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which];
what--
document.rotater.description.value=text[what];
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
what++
document.rotater.description.value=text[what];
}
else window.status='End of gallery'
}
function type()
{
alert("This textbox will only display default comments")
}
</script>
<p><input type=text name="description" style="width:400px" size=50>
<p><input type="button" value="<<Back" name="B2"
onClick="backward()"> <input type="button" value="Next>>" name="B1"
onClick="forward()"><br>
<a href="#" onClick="which=1;what=1;backward();return false"><small>Start Over</small></a></p>
</center></div>
</form>
</td>
</tr>
</table>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="Kit</a></font></p>