Click to See Complete Forum and Search --> : Timed Rotating Back Ground Image


merlin
10-28-2003, 10:11 AM
I am trying to find a script that will change the back ground image on a page based on the time and will continue to change if the page is kept up. I origonally want it to change ever 30 min, but would like it to be adjustable. I found a "Time-base Link Rotation" on here at: http://javascript.internet.com/bgeffects/time-base-link-rotation.html

But I do not know how to apply it to the page back ground. Any suggestions?

Khalid Ali
10-28-2003, 07:58 PM
something like this will work

create an array of images(preload them)

then create a function ike this

var ctr=0;
function ChangeBG(){
var minutes= (60*1000)//one minute
document.body.background =imgArray[ctr];
setTimeout('ChangeBG',minutes);
}