Good morning,
I'm working with a piece of javascript code that I inherited and I'm trying to get the images to link to certain pages. I'm not great with javascript! Below is the code that I'm working with. So, I would need welcome1 to go to ex.html, welcome2 to ex2.html, etc. Can you guys point me in the right direction? Thanks!
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var timeDelay = 5; // change delay time in seconds
var Pix = new Array
("images/welcome1.gif"
,"images/welcome2.gif"
,"images/welcome3.gif"
,"images/welcome4.gif"
,"images/welcome5.gif"
,"images/welcome6.gif"
);
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;
}
</script>
// End -->
<body onLoad="startPix()">
<img src="images/welcome1.gif" name="ChangingPix" border="0" align="middle">
</body>
I'm working with a piece of javascript code that I inherited and I'm trying to get the images to link to certain pages. I'm not great with javascript! Below is the code that I'm working with. So, I would need welcome1 to go to ex.html, welcome2 to ex2.html, etc. Can you guys point me in the right direction? Thanks!
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var timeDelay = 5; // change delay time in seconds
var Pix = new Array
("images/welcome1.gif"
,"images/welcome2.gif"
,"images/welcome3.gif"
,"images/welcome4.gif"
,"images/welcome5.gif"
,"images/welcome6.gif"
);
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;
}
</script>
// End -->
<body onLoad="startPix()">
<img src="images/welcome1.gif" name="ChangingPix" border="0" align="middle">
</body>