I have the following code which is giving me a Method POST, Status (canceled) error message:
Method POST, Status (canceled)
$(document).ready(function() { var xhr = false;
Realistically you need a setTimeout method in order to prevent redundant ajax calls being fired.
clearTimeout(timer); if($("#txt1").val().length >= 2){ timer = setTimeout(function(){ get_data($("#txt1").val()); }, 400); }else{ get_default(); }
This should eradicate your problem.