Ollie
05-03-2003, 01:34 PM
Here is the script that I want to use.....
But I am having a problem with the timing, I want the timing to be in days, I know that I need to write 1000*60*60*24 But Do I need to also write 1000*60*60*24*48 ect for the rest of the images to be swapped? If so I am not clear where to put these numbers. I am new to scripting.. but am learning. Thanks, Ollie
<!-- THREE STEPS TO INSTALL IMAGE CYCLER:
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: D. Keith Higgs (dkh2@po.cwru.edu) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var timeDelay = 20; // change delay time in seconds
var Pix = new Array
("01.jpg"
,"02.jpg"
,"03.jpg"
,"04.jpg"
);
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY OnLoad="startPix()">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<img name="ChangingPix" src="01.jpg">
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.31 KB -->
But I am having a problem with the timing, I want the timing to be in days, I know that I need to write 1000*60*60*24 But Do I need to also write 1000*60*60*24*48 ect for the rest of the images to be swapped? If so I am not clear where to put these numbers. I am new to scripting.. but am learning. Thanks, Ollie
<!-- THREE STEPS TO INSTALL IMAGE CYCLER:
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: D. Keith Higgs (dkh2@po.cwru.edu) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var timeDelay = 20; // change delay time in seconds
var Pix = new Array
("01.jpg"
,"02.jpg"
,"03.jpg"
,"04.jpg"
);
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY OnLoad="startPix()">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<img name="ChangingPix" src="01.jpg">
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.31 KB -->