Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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()
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript includes case insensitive 
Javascript :: how to check if a json object contains a key in jquery 
Javascript :: js reverse array loop 
Javascript :: javascript convert number to binary 
Javascript :: use emmet autocomplete with jsx vs code 
Javascript :: javascript change long digit ot k,m 
Javascript :: usenavigate 
Javascript :: golang convert json string to map 
Javascript :: create stack navigator has been moved to react-navigation-stack 
Javascript :: validator pattern angular for number only 
Javascript :: js get user location 
Javascript :: how to call action from another module vuex 
Javascript :: how to hover the mouse on an element cypress mouseover 
Javascript :: dispatch keydown event javascript 
Javascript :: javascript check if date is less than today 
Javascript :: how to check connected devices in react native 
Javascript :: canvas resize canvas 
Javascript :: js is letter 
Javascript :: jquery get data-id 
Javascript :: javascript make beep 
Javascript :: add array to localstorage 
Javascript :: javascript custom events with data 
Javascript :: how to append to file in js 
Javascript :: jest setImmediate is not defined 
Javascript :: javascript document ready 
Javascript :: round to nearest hundredth javascript 
Javascript :: javascript read json file 
Javascript :: how to call create react app 
Javascript :: allow only letters in div javascript 
Javascript :: select option in reactive forms 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =