Poll the Server with Ajax and Dojo
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 var Poll = function(pollFunction, intervalTime) { var intervalId = null; this.start = function(newPollFunction, newIntervalTime) { pollFunction = newPollFunction || pollFunction; intervalTime = newIntervalTime