Reputation: 51
How can I use ajax to periodically (every 10 seconds) retrieve data from an XML document?
Upvotes: 2
Views: 342
Reputation: 59650
Ajax function can operate same as javascript function. You can use setTimeout("func_name()",10000);
to call your ajax function every 10 seconds.
example:-
function ajaxFunc(){
//-- ajax logic
setTimeout("ajaxFunc()",10000);
}
Upvotes: 1