javascript - jquery-autocomplete how to trigger the “autocomplete” event with send the value (the request value) -


i want trigger “autocomplete” event sorce, , send value set in textbox.

i want user typing value , trigger autocomplete, tried alot examples found didn't send value, , need send value!!

this example dosn't me, because need request (like type it)

$("#companylist").autocomplete({   source : yoursource,   change : yourchangehandler });  $("#companylist").data("autocomplete")._trigger("change"); 

i hope understand me.

if understand (i'm not sure).

you have go costum:

use:

 $('.input_text_forms').keyup(function(event){ }); 

that fires:

 var data = $('#lang_pass_threw').val();  $.post('auto_fill.php', { data: data }, function(response) {  }); 

when request returned:

  var arr = string.split(""); 

now call timeout function , set result value...

here example: jsfiddle

this example bit buggy, there cursor position set.. , backspace event undo autocomplete etc, let me know if need , i'll tune script bit.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -