There has actually been some goings-on with .abort and timeouts...
Here are some tickets if you're interested:
http://prototype.lighthouseapp.com/projects/8886/tickets/308-major-ajax
http://prototype.lighthouseapp.com/projects/8886/tickets/302-ajax-abort-method
The simplest way to fix onSuccess is check if transport.send() is
false according to specs, but your mileage may vary depending on the
browser. It's worth a short though.
(Though you should direct questions outside of the Core group.)
On Aug 15, 8:11 am, Mert Hurturk <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I have found a way to cancel an Ajax.Request. Just wanted to know if
> there is an already solution for this, or a better one?
>
> Here is the code:
>
> var axConnection;
> new Ajax.Request('sample.php', {
> onCreate: function(request) { axConnection =
> request; },
> });
> axConnection.transport.abort();
>
> PS: When I abort the connection the way above, Ajax.Request fires
> onSuccess event. Is there a way to avoid that?
>
> Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---