views:

20

answers:

1

I want to observe the existence of a file with ajax. At the moment I have a refresh button, I have to press to refresh the status. I want to automate this refresh.

+2  A: 

Look into javascript's setTimeout() and setInterval()

 setInterval ( "doSomething()", 5000 );

 function doSomething ( )
 {
      // Put your AJAX in here
      // It will be called every 5 seconds
 }
jakenoble
thank you.. i tried it with setTimeout() but then i had problems with the browser.. setInterval works fine..
elr