I’m using dojo.xhrPost to sent Ajax Requests
The call is wrapped by a function sendRequest()
I’ve now to continuously (every 3sec) send the same ajax Post to the server
How can I implement a Server Poll with Dojo? I basically need to call sendRequest() every 3 secs
I don’t believe that Dojo has a method built-in for polling, so here’s a generic method that’s applicable across frameworks
Usage:
Or in your case:
If you want this as a Dojo package, then the following is a trivial extension:
Usage: