RSS Forums RSS
Please support our Community Introductions advertiser: Programming Forums
Views: 813 | Replies: 1
Reply
Join Date: Jul 2006
Posts: 3
Reputation: ComedyFarm is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ComedyFarm ComedyFarm is offline Offline
Newbie Poster

Conflicts with multiple slideshows

  #1  
Jul 28th, 2006
I am trying to use more than one identical slideshow on the same index page. (Different photos in each slideshow) The first one works fine but when I put the second Photoslider II in everything gets screwed up. I suspect it is duplicate variables but I can't seem to find the solution. I am pasting the code below. Also I am wondering if it is possible to tweek the code so I can click on a thumbnail pic in the slideshow and a larger version of same pic appears in a separate pop up window. I have been working on this for a week but don't know enough about Java to solve the problem. Thanks. Tom - ComedyFarm@yahoo.com
[html]
<table border="0" cellpadding="0">
<caption><strong>Kevin's pet dog</strong></caption>
<tr>
<td width="100%"><img src="http://www.javascriptsolutions.com/imagesOLD/Img002.jpg" 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 http://www.javascriptkit.com
*/
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]="http://www.javascriptsolutions.com/imagesOLD/Img002.jpg"
photos[1]="http://www.javascriptsolutions.com/imagesOLD/Img003.jpg"
photos[2]="http://www.javascriptsolutions.com/imagesOLD/Img004.jpg"
photos[3]="http://www.javascriptsolutions.com/imagesOLD/Img005.jpg"
photos[4]="http://www.javascriptsolutions.com/imagesOLD/ministix4.jpg"
photos[5]="http://www.javascriptsolutions.com/imagesOLD/ministix5.jpg"
photos[6]="http://www.javascriptsolutions.com/imagesOLD/ministix6.jpg"
//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="<A href="http://javascriptkit.com">JavaScript">http://javascriptkit.com">JavaScript
Kit</a></font></p>[/html]
Last edited by cscgal : Jul 29th, 2006 at 5:53 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2006
Location: Tennessee
Posts: 1,567
Reputation: 'Stein is on a distinguished road 
Rep Power: 6
Solved Threads: 103
Colleague
'Stein's Avatar
'Stein 'Stein is offline Offline
Lapsed Skeptic

Re: Conflicts with multiple slideshows

  #2  
Jul 29th, 2006
Hmmm...seeing that this is a community intro page...

Repost in one of these forums:

http://www.daniweb.com/techtalkforums/forum31.html

Thanks.
Now if ya like the help ya could always raise our reputation...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:45 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC