[correction]

Should it just be?
    return (status >= 200 && status < 300);

- Jon L.

On Apr 4, 4:50 pm, "Jon L." <[EMAIL PROTECTED]> wrote:
> (ref:http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thr...)
>
> On Apr 4, 4:38 am, Ree <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > Here's a simple example:
>
> > <div id="container">No records found.</div>
>
> > new Ajax.Updater({success: 'container'}, 'http://...', {method:'get',
> > onComplete: myCallback});
>
> > When the request fails, #container content is left as is - that's
> > fine. When it succeeds, #container content is replaced with the
> > response text - that's fine as well. However, if the request is
> > cancelled (ESC key is pressed, for example), #container content is
> > cleared completely. What is the reason behind this? Any way to prevent
> > this behavior? I would certainly prefer #container left untouched in
> > this case.
>
> Should a request status of 0 really be treated as a "success?"
>
> AFAIK -- as in Ree's issue -- the only time status is 0 is when the
> request is aborted.
> In the case of an abort, the 'success' container is updated to
> responseText; which is empty.
>
>   success: function() {
>     var status = this.getStatus();
>     return !status || (status >= 200 && status < 300);
>   },
>
> Should it be?
>     return !!status || (status >= 200 && status < 300);
>
> (not sure about Ree, but I'm looking at 1.6.0.2.)
>
> - Jon L.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to