On 30 September 2011 13:09, Phil Petree <phil.pet...@gmail.com> wrote:
> I never meant to imply that onComplete did the same thing as onSuccess, what
> I meant to state was that onComplete ALWAYS gets called last.  onSuccess can
> always set a flag and onComplete can do the UI updates right before turning
> off the spinner.   This is useful if you're experiencing those
> "asynchronicity" problems that the OP thought he had...  Almost a poor mans
> semaphore manager.

I'd be wary of performing activities in onComplete which are based
upon results in onSuccess.

I've patched my Prototype to allow me to create a responder for any
callback (including statuses) as well as the ability for the
responders to block the local callback. Primarily this is for AJAX
error handling. I can return an appropriate status from the server, or
the request can fail (for something out side of my control) and all
the handling is done at the responder level. This makes my specific
AJAX calls much cleaner as they only need the onSuccess callback. This
mechanism works very well for me.

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 
For more options, visit this group at 

Reply via email to