View Full Version : Execute function every minute

03-26-2010, 08:11 AM
I'm using this code but it only runs the function once

<body onLoad="setTimeout(function(){ajaxFunctionas('34');}, 60000)">

is there a way to have this function keep running every minute?

03-26-2010, 09:15 AM
setInterval did it!

03-26-2010, 10:23 AM
setTimeout should work, but it's a one time event-- you could put that in a loop (so it sets a new timeout each time you end one). setInterval should be easier. Glad you found it.