jQuery in Action, 2nd edition*
The moose likes HTML, CSS and JavaScript and the fly likes Conflicting slideshows on same page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Conflicting slideshows on same page" Watch "Conflicting slideshows on same page" New topic

Conflicting slideshows on same page

Tom Neuhoff

Joined: Jul 28, 2006
Posts: 2
I have copied and pasted Photoslider II (Javascriptkit.com) onto the index page. It works fine but I am trying to paste three Photosliders on same page with three different categories of photos. As soon as I paste the second one in everything gets screwed up. I suspect it could be duplicate variable but I don't know which ones and what do I change the second and third set of code to? While I would like to resolve this problem at some point I am also curious if it is possible to tweek the code so I could click on a thumbnail in the slideshow and a pop up window with a larger version of same pic would appear in a separate window. If I can't do this it's no problem but I would love to find out how to change the code below for the second and third slideshow. Thanks for your help.

<table border="0" cellpadding="0">
<caption><strong>Kevin's pet dog</strong></caption>
<td width="100%"><img src="http://www.javascriptsolutions.com/imagesOLD/Img002.jpg" width="400" height="264" name="photoslider"></td>
<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

//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){

function forward(){
if (which<photos.length-1){
else window.status='End of gallery'

function type()
alert("This textbox will only display default comments"

<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"
<a href="#" onclick="which=1;what=1;backward();return false"><small>Start Over</small></a></p>

<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
You have a mismatch of global variables. You would need to either change them or find a script that is OO or use iframes.

I agree. Here's the link: http://aspose.com/file-tools
subject: Conflicting slideshows on same page
Similar Threads
DHTML menu problems, keeps going and going...
Dynamic form/checkbox problem
URL parameter ~~howto ?
problem as menu show behind of flash~ pls help
What happen to this Tabbed form ?