Autocomplete events (.change) not firing
Hello.
I am using the follow Autocomplete code on a textbox in my web page, and it is working well except for the events not firing.
I've tried change, selected, and a few others with no success. Can anyone tell me what I'm missing?
<
script
type
="text/javascript">
$(document).ready(
function
() {
$(
'#tbOrganization'
).autocomplete(
'@
Url.Action(
"LookupOrgs"
,
"Utilities"
)
'
, {
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].Tag, result: data[i].Tag };
}
return
rows;
},
formatItem:
function
(row, i, max) {
return
row.Tag;
},
change:
function
(event, ui) {
alert(
'hi'
);
},
width: 300
});
});
</
script
>