views:

30

answers:

1

Hi guys - a long while back when I built my first web application I used sajax by modernmethod to add ajax features to it. NOw its been a while and I have to clean it up a bit - I haven't set any real checks and my code of the time is terrible inefficient and to top things off it seems that sajax is dead?

How do you cancel a specific ajax request made using sajax? please help!

+1  A: 

XMLHttpRequest object has an abort function but i don't know how stuff works with sajax.

Ahmet Kakıcı
I checked the library and it seems that sajax puts all XMLHTTPREquest objects into an array queue.
Ali
So you may itarate over the array and abort them?
Ahmet Kakıcı
Done - required a bit of hacking here - set it up so it returned the index of the array where the function was and I maintained the index position in a global. Easy to abort a selected index in the queue now that I know which index refers to which request. Thanks for the idea!
Ali