Run JavaScript function every n seconds
//tell javascript to run a function in 1 second
setTimeout ("myFunction()", 1000 );
function myFunction(){
//do stuff
//once the function is finished, queue this function up to run again in 1 second
setTimeout ( "myFunction()", 1000 );
}
April 23rd, 2010 at 12:00 pm
setInterval() does this.