Just curious, I have this function:
setInterval( function(){
sendAjax('search', eInput, function(responseText){
$("#txtResp").html(responseText);
})
}, 5000 );
It runs this function continuously, with no interval. It causes my sendAjax function to run like crazy.
I just need it to run every 5 seconds. Any help?
Regards,
Taylor
Doubt this is the problem, but don’t forget to end your lines with a semicolon
Also it could be a problem that just because you’re doing something every 5 seconds, the callback to
sendAjaxwill be executed when a response is received regardless of the interval. So you may be seeing consecutive responses repeatedly writing to the #txtResp div