I'm a total newbie & can't get this slideshow script to run in FF or Safari. Works fine in IE. Can anyone help me?
Here's the script:
var slideCache = new Array();
function RunSlideShow(pictureName,imageFiles,displaySecs)
{
var imageSeparator = imageFiles.indexOf(";");
var nextImage = imageFiles.substring(0,imageSeparator);
if (document.all)
{
document.getElementById(pictureName).style.filter="blendTrans(duration=2)";
document.getElementById(pictureName).filters.blendTrans.Apply();
}
document.getElementById(pictureName).src = nextImage;
if (document.all)
{
document.getElementById(pictureName).filters.blendTrans.Play();
}
var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)
+ ';' + nextImage;
setTimeout("RunSlideShow('"+pictureName+"','"+futureImages+"',"+displaySecs+")",
displaySecs*1000);
imageSeparator = futureImages.indexOf(";");
nextImage = futureImages.substring(0,imageSeparator);
if (slideCache[nextImage] == null) {
slideCache[nextImage] = new Image;
slideCache[nextImage].src = nextImage;
}
}
Here's the HTML:
<DIV>
<IMG src="images/1a.gif" name="banner1" width="200" height="200">
<script language="JavaScript">
setTimeout('RunSlideShow("banner1","images/1a.gif;images/3.gif;images/7.gif;images/9.gif;images/8a.gif;images/14.jpg",5)',100)
</script>
</DIV>
Thanks in advance,
Gary
Here's the script:
var slideCache = new Array();
function RunSlideShow(pictureName,imageFiles,displaySecs)
{
var imageSeparator = imageFiles.indexOf(";");
var nextImage = imageFiles.substring(0,imageSeparator);
if (document.all)
{
document.getElementById(pictureName).style.filter="blendTrans(duration=2)";
document.getElementById(pictureName).filters.blendTrans.Apply();
}
document.getElementById(pictureName).src = nextImage;
if (document.all)
{
document.getElementById(pictureName).filters.blendTrans.Play();
}
var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)
+ ';' + nextImage;
setTimeout("RunSlideShow('"+pictureName+"','"+futureImages+"',"+displaySecs+")",
displaySecs*1000);
imageSeparator = futureImages.indexOf(";");
nextImage = futureImages.substring(0,imageSeparator);
if (slideCache[nextImage] == null) {
slideCache[nextImage] = new Image;
slideCache[nextImage].src = nextImage;
}
}
Here's the HTML:
<DIV>
<IMG src="images/1a.gif" name="banner1" width="200" height="200">
<script language="JavaScript">
setTimeout('RunSlideShow("banner1","images/1a.gif;images/3.gif;images/7.gif;images/9.gif;images/8a.gif;images/14.jpg",5)',100)
</script>
</DIV>
Thanks in advance,
Gary