Autocomplete pre populate other input
Hi, i'm using autocomplete on one input.
Now i like to populate other input with the selection of the first...
I'm trying like this, but dosent work... Anybody can give me some help?
- <script>
$(document).ready(function(){
$('#ncm').keyup(function(){
var $this = $(this);
var valueSearch = $this.val()
$("#ncm").autocomplete("ncm_autocomplete.asp", {
selectFirst: true,
multiple: true,
width: 400,
minChars: 3
});
$('#cest').focus(function(){
//alert($this.val()); //this works
$("#cest").autocomplete("cest_autocomplete.asp?ncm="+$this.val(), {
selectFirst: true,
multiple: true,
width: 400
});
});
});
});
</script>