With this code, I can show an animated gif while the script server is running:
function calculateTotals() { $('#results').load('getResults.php', null, showStatusFinished); showLoadStatus(); } function showLoadStatus() { $('#status').html(''); } function showStatusFinished() { $('#status').html('Finished.'); }
However, I would like to display the status of how far the script is, for example. โProcessing line 342 of 20,000 ...โ and count it until it is complete.
How can i do this? I can create a script server that constantly contains updated information, but where can I put this command to read this, say, every second?
jquery ajax
Edward tanguay
source share