In my ecommerce has a search field. As the user goes typing, it returns a list of products in a div below the search field. this is 100%
In the label I put an onkeyup that performs a function that searches the product list and displays. this is 100% too
My problem is that if the digital person "battery s5" for example will get 10 get synchronous, each result display will take ~ 1 seconds, the exportation of the product list in this example would take ~ 10 seconds
My question is if you have a new request to stop / break / kill the previous request
Follow below my get
$.ajax({
url: "<?=$this->Html->url(array('controller' => 'busca', 'action' => 'searchanise'));?>",
type: 'POST',
async: false,
data: {texto: text},
success: function(data){
retorno = JSON.parse(data);
$("#searchanise").html(retorno);
}
});