I use a ajax code to monitor a folder to count the number of files in that folder that are being copied with a external batch that I didn't have access. I have the following infinite loop that is working quite fine:
function loadProgWav(files){
$("#wav").load("progress_wav.php?file=<?=$row[2]?>");
}
setInterval(function(){ loadProgWav(files) }, 10000);
The ajax return to me a formatted string with a message of how many files have in that folder. But now I need to be able to stop that loop if the progress_wav.php returns false, and show a submit button to redirect to another page of code, but have no idea on how do so.
I'm running the program in a Windows Server 2003 machine with Xaamp.