Forum Moderators: open
<SCRIPT LANGUAGE="JavaScript" SRC="fader.js"></SCRIPT>
the second is hardcoded into the page using the code below.
<div class="indeximage">
<SCRIPT LANGUAGE="JavaScript">
<!--
//set image paths
src = ["images/index1.jpg", "images/index2.jpg", "images/index3.jpg", "images/index4.jpg" , "images/index5.jpg"]
//set duration for each image
duration = 3;
//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>
<IMG NAME="Ad_Image" SRC="images/index1.jpg" BORDER=0>
</div>
the div class just controls where i want this set on the page. nothing more defined in this class. the problem i am coming across is that when i use this script the slideshow is showing ok but it takes the images from my header which is the one called into the page, and leaves it blank. Strangely enough though if i move the </script> tag to after <IMG NAME="Ad_Image" SRC="images/index1.jpg" BORDER=0> then this brings back the header images but takes away the slideshow from the above script.
I am some what confused. Any help would be great.
It's hard to debug this without having the whole page here to play with. For one thing, I don't know what "fader.js" does.
See the symptom and step through your script to find the cause. Something about the slideshow makes your image disappear, right?
If you spend a few hours on this and still can't get it working, toss it. This is an ornery little script knitted together using some odd techniques... and there are thousands of other slideshow scripts on the www.
Debugging is tricky, isn't it?