I have several jacks asynchronous calls which are being called in a loop. At the end of the last call, I want to refresh the page to show the result after the phone call. I do not have any work, I would not appreciate either work or work on better solution.
Thank you.
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 /' + batch id + / 1 '; }
All concurrent AJAX requests are set to fire, so that you can straighten it For example:
function () {$ (document) .ajaxStop (function () {window.location.href = applicationRoot + 'Qc.mvc / ViewQc /' + Batch ID + '/ 1';}); $ ajax ({...});}
If you have enabled active AJAX requests If the count is required, then jQuery already maintains it, it does not just publish it ... it is actually determined that when ajaxStart
and ajaxStop
The event is used for the fire. You can get it through a $. Activated
In jQuery 1.5+ this is happening $ Ajax.active
. Moved to
Comments
Post a Comment