473,395 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

can someone tell me how to put slideshows on the same page?

1
it seems quite stupid but i am building up my web site and i am stocked with this problem: i download this photoslider script and wanted to have two on the same page but they are interfering one each other..
now: i read that to avoid this i should change the names of the variables and those of the functions on the second script , but i do not know where to start from!
can anybody explain me in a simple way (i do not know java at all!) what i have to change and where precisely?
it would really help me and save me!!!!

here is the script:

[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="http://javascriptkit.com">JavaScript
Kit</a></font></p>[/HTML]
Mar 14 '07 #1
1 1543
Logician
210 100+
it seems quite stupid but i am building up my web site and i am stocked with this problem: i download this photoslider script and wanted to have two on the same page but they are interfering one each other..
You need a script that allows multiple instances in the same document, without having to edit anything. Link
Mar 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

114
by: muldoon | last post by:
Americans consider having a "British accent" a sign of sophistication and high intelligence. Many companies hire salespersons from Britain to represent their products,etc. Question: When the...
6
by: What-a-Tool | last post by:
I'm going out out of my mind trying to get this to work with no luck. The error message I get is at the bottom. Can someone please tell me what I'm doing wrong here. I've tried this a million...
1
by: Christopher | last post by:
Can someone tell me why this doesn't work? I'm trying to pop a page if someone exits a page and a checkbox is left unchecked. // Start onUnload script// function noBuy(){ if (agree.checked ==...
2
by: Richard Bell | last post by:
Newbie question ... please respond to group I'm trying to open/navigate to a url. How can I tell when the page is fully loaded? Testing suggest that window.open returns before the page is...
11
by: milkyway | last post by:
Hello, I have an HTML page that I am trying to import 2 .js file (I created) into. These files are: row_functions.js and data_check_functions.js. Whenever I bring the contents of the files into...
6
by: Helmut Giese | last post by:
Hello out there, I am a rather experienced C programmer. However, today I got a javascript assignment because someone left (something like: "You're a great programmer - you'll handle this.") and I...
21
by: MLH | last post by:
A97 procedure to open http://www.arch.com/message/ enter an 800 number, press "Continue", enter a text msg string from a memo field and press "Send" This is a calendaring and appointment A97...
7
by: Jay | last post by:
I have posted this same question several times, however, no one seems to have any idea how to accomplish this task. I have a fairly long datagrid that spans several pages when printed. Problem...
1
by: boston01 | last post by:
I am testing a database application. It works fine when only one user uses the application, however, when there are concurrent users, I saw rollbacks in event log. Can experts in this group...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.