Hello,
Based on: http://stackoverflow.com/questions/446594/kill-ajax-requests-using-javascript-using-jquery... In inventory_search() - before the ajax request is made, how can I check for any current requests and abort() them before making a new request? Or... Is there a better way to do this?
<script type="text/javascript">
$(function() {
$('form#internal_catalog').change(function() {
inventory_search();
});
});
function inventory_search() {
var search_data = $('form#internal_catalog').serialize();
var a = $.ajax({
type: 'post',
url: '/test.php',
data: search_data,
success: function(data) {
$('#catalog').html(data);
}
});
}
</script>