I'm about 80% into my first attack on JQuery/AJAX... how would one correctly write this function:
function reloadResponses(){
$('#responses').load('pages/community/load-responses.php?id=<?php echo $id;?>'){
window.setTimeout(reloadResponses, 10000);
};
};
I would like to reload <div id="reponses"></div>
every 10 seconds. Is this the best way?
I am currently using this to reload the div every 10 seconds:
var auto_refresh = setInterval(
function (){
$('#responses').load('pages/community/load-responses.php?id=<?php echo $id;?>');
}, 10000);
but it appears to cause my chrome tab to crash randomly (right in the middle of me typing a massive paragraph!) Thoughts?
Thanks DW'ers,
Michael