Walter, I don't think that's correct. The onSuccess callback is called when the XHR request has been fully completed (all data received), not when data receipt begins (XHR readyState 4, not XHR readyState 3). It's called only for successful requests (200 <= HTTP response code < 300), and only if you didn't register a specific handler for the specific code that came back (on200, etc.). If the request failed and you didn't specify a specific handler for the code that came back, onFailure is called instead.
onComplete is called no matter what happened -- whether the request succeeded, failed, etc. It occurs immediately after onSuccess/onXYZ/ onFailure. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Apr 13, 2:39 pm, Walter Lee Davis <wa...@wdstudio.com> wrote: > onSuccess means about the same thing as a 200 header from the server. > "Yes", it says, "the content is here where you asked for it, and I've > sent it along your way. Hope you get it all eventually." onComplete, > on the other hand, means "Here's your content; I've verified that you > got all of it, and that everything that was supposed to happen here > has happened." > > Walter > > On Mar 1, 2009, at 4:41 PM, Quleczka wrote: > > > > > On 1 Mar, 22:38, BearState <wixelb...@yahoo.com> wrote: > >> I found out that onSuccess has little to do with > >> successfully returning anything from the script. > > > What do you exactly mean by this? > > > Quleczka > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---