rakete
rakete

Reputation: 3041

How can I observe the existence of a file with ajax live?

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.

Upvotes: 0

Views: 48

Answers (1)

Jake N
Jake N

Reputation: 10583

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

 setInterval ( "doSomething()", 5000 );

 function doSomething ( )
 {
      // Put your AJAX in here
      // It will be called every 5 seconds
 }

Upvotes: 2

Related Questions