norvin
01-05-2003, 09:33 PM
I am unfamiliar with Javascript so assistance from someone would be greatly appreciated.
I downloaded a script from the following url:
http://javascriptkit.com/script/script2/incrementslide.shtml.
The script provides a slideshow which will intelligently preload its images one at a time, while the preceding image is being shown. The script will actually "wait" until the next image is successfully preloaded before continuing, trying again if not.
I want to put four different slideshows on different areas of my page. Of course each show would have different images.
I read the tutorial located at http://www.javascriptkit.com/javatutors/multiplejava.shtml
regarding adding more than one script to a site however it did not seem to relate to this script
Thank you for your time and assistance.
Regards
Norman
The script is as follows:
<SCRIPT LANGUAGE="JavaScript">
<!--
/*
Script by FPMC at http://jsarchive.8m.com
Submitted to JavaScript Kit (http://javascriptkit.com)
For this and 400+ free scripts, visit http://javascriptkit.com
*/
//set image paths
src = ["image1.gif", "image2.gif", "image3.gif", "image4.gif"]
//set corresponding urls
url = ["http://freewarejava.com", "http://javascriptkit.com", "http://dynamicdrive.com", "http://www.geocities.com"]
//set duration for each image
duration = 4;
//Please do not edit below
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
</SCRIPT>
<A HREF="javascript:doLink();" onMouseOver="status=url[ct];return true;"
onMouseOut="status=''">
<IMG NAME="Ad_Image" SRC="image1.gif" BORDER=0>
</A>
<p align="center"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>
I downloaded a script from the following url:
http://javascriptkit.com/script/script2/incrementslide.shtml.
The script provides a slideshow which will intelligently preload its images one at a time, while the preceding image is being shown. The script will actually "wait" until the next image is successfully preloaded before continuing, trying again if not.
I want to put four different slideshows on different areas of my page. Of course each show would have different images.
I read the tutorial located at http://www.javascriptkit.com/javatutors/multiplejava.shtml
regarding adding more than one script to a site however it did not seem to relate to this script
Thank you for your time and assistance.
Regards
Norman
The script is as follows:
<SCRIPT LANGUAGE="JavaScript">
<!--
/*
Script by FPMC at http://jsarchive.8m.com
Submitted to JavaScript Kit (http://javascriptkit.com)
For this and 400+ free scripts, visit http://javascriptkit.com
*/
//set image paths
src = ["image1.gif", "image2.gif", "image3.gif", "image4.gif"]
//set corresponding urls
url = ["http://freewarejava.com", "http://javascriptkit.com", "http://dynamicdrive.com", "http://www.geocities.com"]
//set duration for each image
duration = 4;
//Please do not edit below
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
</SCRIPT>
<A HREF="javascript:doLink();" onMouseOver="status=url[ct];return true;"
onMouseOut="status=''">
<IMG NAME="Ad_Image" SRC="image1.gif" BORDER=0>
</A>
<p align="center"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>