Answers for "jquery abort() ajax request before sending another"

2

jquery cancel ajax request on click

var xhr = $.ajax({
    type: "POST",
    url: "some.php",
    data: "name=John&location=Boston",
    success: function(msg){
       alert( "Data Saved: " + msg );
    }
});

//kill the request
xhr.abort()
Posted by: Guest on December-18-2020

Code answers related to "jquery abort() ajax request before sending another"

Code answers related to "Javascript"

Browse Popular Code Answers by Language