I have a text box which implements jquery autocomplete. I am using controller and action to load the auto complete. On selection of a value i want the value to be loaded to another textbox. I used select event but it is not giving me the result. I have attached my code snippet. kindly help me to resolve the issue
<script type="text/javascript">
$(document).ready(function () {
$("#customer").autocomplete('/UserAdd/ClientList',
{
dataType: 'json',
parse: function (data) {
var rows = new Array();
for (var i = 0; i < data.length; i++) {
rows[i] = { data: data[i],value: data[i].AccountNumber, result: data[i].Name };
}
return rows;
},
formatItem: function (row, i, max) {
return row.Name;
},
select: function (event, ui) {
$('#ClientName').val = ui.item.result;
},
width: 300,
highlight: false,
multiple: true,
multipleSeparator: ","
});
});
</script>