I want to show auto search result below the search box as the user types in the letters and not wait for a button click (similar to Google Instant search) . So wjhat I need to do is make an AJAX call and get the data from the database as the user is typing. In this case if someone wrote 4 characters then 4 AJAX calls will be fired and from all these AJAX calls last response will be taken as a search result. Sometime it may not be correct. Because at times before a AJAX call response is recieved another AJAX call has been fired.In this case we may have inconsistant data. And to solve this issue we have to abort the previously fired AJAXvcalls. Sample code given below can help solve the problem.