AJAX MultiCompleter
We recently needed to fire off a bunch of Prototype AJAX requests at once and be informed when they’re all finished. This simple class handles that for you. (Requires Prototype, of course.)
Download Ajax.MultiCompleter
Example
var c = new Ajax.MultiCompleter({
onComplete: function(){ alert("all jobs done") },
onSuccess: function(){ alert("all jobs were successful") },
});
// start off your requests
new Ajax.Request(url, { multiComplete : c });
new Ajax.Updater(url2, someDiv { multiComplete : c });
new Ajax.Request(url3, { multiComplete : c });
// tell it we're done adding
c.finishedAdding();
james hughes
that wasn’t funny at all. your standards are slipping.
13 Feb 2009, 16:32
Nick Howes
Thanks Jam Hug. Hope you’re well. I deleted your three duplicate comments for you.
16 Feb 2009, 08:35
Add a comment
You are not allowed to comment on this entry as it has restricted commenting permissions.