I have a number of jquery asynchronous calls being called in a loop. At the end of the last call, I want the page to refresh to show the results after the call. What I have isn't working. I would appreciate some help on either why its not working or a better solution!
Thanks.
var ajaxCount = 0;
$(document).ready(function () {
$(document).ajaxStart(function () {
ajaxCount = 1;
});
$(document).ajaxStop(function () {
ajaxCount = 0;
});
}
function(){
for(x loops){
$ajax({...});
}
while (ajaxCount != 0) { }
document.location = applicationRoot + 'Qc.mvc/ViewQc/' + batchId + '/1';
}