Click to See Complete Forum and Search --> : refreshing div


dougal85
12-11-2006, 06:41 PM
hi,

I've got a PHP function that is called via xajax... the result of it is put into a div. How can i get javascript to automatically keep checking to see if the value has changed?

would i have to use the javascript delay and call itself, creating a loop like that?

JPnyc
12-11-2006, 07:25 PM
you can use setInterval on the call itself, it will call the function at that interval eg.

onload="setInterval('myAJAXfunction()', 10000)" will call the function every 10 seconds.

dougal85
12-11-2006, 07:58 PM
cool, thanks