I have this function:
function (Blobs) {
console.log(JSON.stringify(Blobs));
// Make the progress bar here
Blobs.forEach(function(Blob) {
console.log(Blob);
$.post(window.location.href + '/add', Blob);
// Increment the progress bar by the correct amount, once above request has completed
});
}
(This function is passed as an argument, hence no name)
I want a progress bar to be shown, showing how many of the 'n' requests have returned. The page the request is POSTing to may take some time (5ish seconds) to respond, and the loop may need to run multiple tens of times. Once all the requests have completed, I need to redirect to another page.
Any help would be great!