On 30 September 2011 12:53, Chris Sansom <ch...@highway57.co.uk> wrote: > On 30 Sep 2011, at 12:32, Richard Quadling wrote: > >> onFailure / onSuccess is in response to a working result from the AJAX call. >> >> onComplete is in response to the AJAX mechanism shutting down. >> >> onComplete will always be called, but it isn't its job to deal with >> the data from the call. That is onSuccess. If the call failed for some >> reason, onComplete wouldn't have any data to work with and could make >> things worse. >> >> I use onCreate and onComplete to turn on/off a little spinner showing >> that the app is doing something behind the scenes. > > Right - thanks. That could be useful. > > -- > Cheers... Chris > Highway 57 Web Development -- <http://www.highway57.co.uk/> > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > >
And if you use the Ajax.Responders (http://api.prototypejs.org/ajax/Ajax/Responders/), you can define that behaviour once for all of the ajax calls you make, rather than having to add it to each individual ajax instance. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.