[jquery-dev] Re: aborting Ajax calls the success callback

2010-01-17 Thread alexander farkas

 I think calling error: with a statusText of abort would be the more
 intuitive way of handling this.

Sorry, why should you want to handle abort the same way you handle an
error? If you intentional abort a request, it stops/completes, but i
don´t see an error in this. Why not simply use the complete event/
callback with status abort.
-- 
You received this message because you are subscribed to the Google Groups 
jQuery Development group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.




[jquery-dev] Re: aborting Ajax calls the success callback

2010-01-16 Thread alexander farkas
I think, it should only call complete and the status message should be
abort (or the readyState property is always 0).

In most cases abort is used to cancel the request and the default
handling/succes handling, because the request became unneeded. An
error doesn´t fit, either. This would make problems with error-
handling.

Abort is a totally new even-type, so that we need a way to distinguish
between abort and the other complete/stop events.

On 17 Jan., 02:48, John Resig jere...@gmail.com wrote:
 It's not really clear what it should call - maybe it should only call
 the complete request and neither the error or success. When I looked
 into it recently some browsers called success and some called nothing
 (Opera). I normalized it to success across the board but I'm open to
 further debate.

 --John

 On Sat, Jan 16, 2010 at 7:47 PM, alexander farkas

 a.farkas...@googlemail.com wrote:
  Is it intended, that aborting an Ajax will call the complete calback
  with the status success + the success-callback? In most cases noone
  wants to handle an aborted request in his success-callback. I think,
  you should introduce a new xhr-event/callback 'abort'.

  --
  You received this message because you are subscribed to the Google Groups 
  jQuery Development group.
  To post to this group, send email to jquery-...@googlegroups.com.
  To unsubscribe from this group, send email to 
  jquery-dev+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/jquery-dev?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
jQuery Development group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.