All 1 entries tagged Prototype

View all 3 entries tagged Prototype on Warwick Blogs | View entries tagged Prototype at Technorati | There are no images tagged Prototype on this blog

February 13, 2009

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();

March 2023

Mo Tu We Th Fr Sa Su
Feb |  Today  |
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31      

Search this blog

Tags

Galleries

Most recent comments

  • Hey thank you for this post. It might need a bit updating, but it helped me a lot to find the right … by Alex on this entry
  • Logging is another prime use for AOP good article. by Nick Howes on this entry
  • Hi, another basic AspectJ Spring example can be found here http://www.developers–blog.org/blog/defau… by Rafael on this entry
  • Thanks Jam Hug. Hope you're well. I deleted your three duplicate comments for you. by Nick Howes on this entry
  • that wasn't funny at all. your standards are slipping. by james hughes on this entry

Blog archive

Loading…
RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXXIII