My html page fires off 2 php scripts, one to perform a task and another to poll a log file and show results on the html page. After the ‘updatestock.php’ has finished how do I stop the getStatus() process?
<script type="text/javascript">
$(function() {
startProcess();
getStatus();
});
function startProcess() {
$("#done").load('updatestock.php');
}
function getStatus() {
$("#status").load('getstatus.php');
setTimeout("getStatus()",2000);
}
</script>
1 Answer