I have an app that sends multiple Ajax requests simultaneously. I was originally running into race conditions until I discovered the jQuery Ajax Queue plugin, which works gr
ajaxManager plugin is based on the Ajax Queue Plugin but is a bit more flexible and works with jQuery 1.3.2.
You should be able to use jQuery's built-in queue support if you're willing to do a bit of legwork.
// First Ajax request
$(document).queue("ajaxRequests", function() {
$.ajax({
// Stuff
success: function() {
$(document).dequeue("myName");
});
});
});
// Second Ajax request
$(document).queue("ajaxRequests", function() {
$.ajax({
// Stuff
success: function() {
$(document).dequeue("myName");
});
});
});
// Trigger the queue
$(document).dequeue("ajaxRequests");
Of course, it would be pretty easy to wrap that in a plugin.
Just found the answer to this looking for a solution myself. Someone decided to modify the original ajaxQueue plugin.
http://www.onemoretake.com/2009/10/11/ajaxqueue-and-jquery-1-3/