Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Text caption to image slideshow

Status
Not open for further replies.
Sep 7, 2009
29
US
Hello, I was wondering if someone can show me how to add a text bar to bottom of my pics in my imageslideshow script. Here is my code:

Code:
<body topmargin="5" leftmargin="0" marginheight="0" marginwidth="0"  onload="runSlideShow();initAll()">




var crossFadeDuration = 3;
var Pic = []; 
Pic[0] = 'One.gif'
Pic[1] = 'Two.gif'



var slideshow;
var m = 0;
var n = Pic.length;
var slideShowSpeed = 2000;

var preLoad = new Array();
for (i = 0; i < n; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

function runSlideShow(){
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply() 
}
document.images.SlideShow.src = preLoad[m].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play()
}

slideshow = setTimeout('runSlideShow()', slideShowSpeed);
}
 
That script you are using has an onload within the body tag which is an outdated way of triggering scripts.

Rather than edit this script until it works as you want, use an existing slideshow script that already does what you want. e.g. and
Check that the script works in all major browsers (IE, FF, Chrome, Safari, Opera) and check that it is easily installed and customised.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top