Here's the script. Its a basic slide show.
In the body tag I have
And here's where everything else is being called:
This works fine when the files are on my computer but won't run after being uploaded to the server. It displays a blank space where the images shold be. The controls show up but don't do anything. Firebug doesn't throw any errors. I'm stumped.
Code:
<script>
var speed = 3000;
var fadeDur = 1;
var Pics = new Array();
Pics[0] = 'images/2009/crazyhair1.jpg';
Pics[1] = 'images/2009/crazyhair2.jpg';
Pics[2] = 'images/2009/crazyhair3.jpg';
Pics[3] = 'images/2009/crazyhair4.jpg';
Pics[4] = 'images/2009/mealtime.jpg';
Pics[5] = 'images/2009/l&l1.jpg';
Pics[6] = 'images/2009/l&l2.jpg';
Pics[7] = 'images/2009/missednap.jpg';
Pics[8] = 'images/2009/logan&dad.jpg';
Pics[9] = 'images/2009/reading.jpg';
Pics[10] = 'images/2009/logancloseup.jpg';
Pics[11] = 'images/2009/hiking1.jpg';
Pics[12] = 'images/2009/hiking2.jpg';
Pics[13] = 'images/2009/hiking3.jpg';
Pics[14] = 'images/2009/hiking4.jpg';
Pics[15] = 'images/2009/hiking5.jpg';
var timeout;
var image = 0;
var length = Pics.length;
var preLoad = new Array();
for (i = 0; i < length; i++)
{
preLoad[i] = new Image();
preLoad[i].src = Pics[i];
}
function runShow()
{
if (document.all)
{
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=fadeDur)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[image].src;
if (document.all)
{
document.images.SlideShow.filters.blendTrans.Play();
}
image = image + 1;
if (image > (length-1))
{
image=0;
}
timeout = setTimeout('runShow()', speed);
}
function stopShow()
{
clearTimeout(timeout);
}
function slideshowNext()
{
stopShow();
image=image+1;
if (image > (length-1))
{
image=0;
}
if (document.all)
{
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=fadeDur)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[image].src;
if (document.all)
{
document.images.SlideShow.filters.blendTrans.Play();
}
}
function slideshowBack()
{
stopShow();
image=image-1;
if (image<0)
{
image=(length-1);
}
if (document.all)
{
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=fadeDur)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[image].src;
if (document.all)
{
document.images.SlideShow.filters.blendTrans.Play();
}
}
</script>
In the body tag I have
Code:
onload="runShow()"
And here's where everything else is being called:
Code:
<tr>
<td id="imagearea">
<img src="images/2009/crazyhair1.jpg" name='SlideShow' width=540 height=375>
</td>
</tr>
<tr>
<td><center><a href="javascript:slideshowBack()"><img src="images/backar.gif"></a>
<a href="javascript:stopShow()"><img src="images/pause.gif"></a>
<a href="javascript:runShow()"><img src="images/play.gif"></a>
<a href="javascript:slideshowNext()"> <img src="images/nextar.gif"></a>
</center>
</td>
</tr>
This works fine when the files are on my computer but won't run after being uploaded to the server. It displays a blank space where the images shold be. The controls show up but don't do anything. Firebug doesn't throw any errors. I'm stumped.