Web Hosting Talk







View Full Version : javascript help


dnout
05-01-2009, 05:23 AM
Hi there,

I have a roating gallery script, but I only want the slideshow to play once,. instead of looping.

This is the javascript:



autoplay: false,
persist: false,
pause: 3000, //pause between slides (milliseconds)
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
vacationdiv=document.getElementById("myvacation");
var d = document.getElementById(this.wrapperid).getElementsByTagName('div'), c, i;
for (i = d.length - 1; i > -1; --i)
if (d[i].className == 'navpanellayer'){
c = d[i];
break;

}
document.getElementById('simpc1').appendChild(c.parentNode.removeChild(c));

},
onslide:function(curslide, i){
document.getElementById("myvacation").innerHTML=vacationtext[i]
}

})



Can anyone help me out here to make it play only once?

Thanks.

nayes84
05-01-2009, 10:16 AM
can you post the full code?

under_gravity
05-05-2009, 07:11 AM
if you post the full code then we can help better, assuming generic technique is being used here then you will probably need one additional inner loop.. but again there are other better ways to skin a cat.