Reputation: 53
I have php includes in different divs, how can i use ajax to constantly refresh the data outputted from the php file every second, I have multiple things that need to refresh, one per div
Upvotes: 1
Views: 75
Reputation: 781
settimeout
setimeout
function, perform the ajax request div
element with the results from the ajax requestsettimeout
function in the ajax response and perform the step 2 and 3. Upvotes: 2
Reputation: 483
send a ajax request per second.
window.setTimeout(function () {
$.ajax({
// param
});
}, 1000);
Upvotes: 0