PDA

View Full Version : ajax polling help



MoShAn480
26 Apr 2007, 4:09 PM
Hi,

i am building a application whihc needs to do periodic polls to the server. What is the best way to accomplish this. I tried using the folloing, but it does not poll and th callback is never fired:

YAHOO.util.Connect.asyncRequest("POST", ajaxUrl, serverPollCallback, pollXmlData);
YAHOO.util.Connect.setPollingInterval(5000);

Thanks!

Animal
26 Apr 2007, 11:07 PM
Have you read the YAHOO documentation?

YAHOO.util.Connect does not do server polling. The polling interval is how long between each check of the request status.

Use this: http://extjs.com/deploy/ext/docs/output/Ext.UpdateManager.html#startAutoRefresh

MoShAn480
27 Apr 2007, 7:49 AM
I see, i will read the documentation. Thank you.