How to stop all ajax process in the page using jQuery ?
Asked
Active
Viewed 9,018 times
0
-
@enthusiastic : I want to stop all ajax in page not one of them – faressoft Feb 10 '11 at 13:13
3 Answers
1
The way to kill a single AJAX process is this way
var x = $.ajax({
type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
//kill the request
x.abort()
After you declare 'x' and initialize the ajax, simply add x
to an array. Then you can cycle through the array and call each items .abort()
method.

Dutchie432
- 28,798
- 20
- 92
- 109