jQuery UI autocomplete not working in IE
- by Peter Di Cecco
Hi all,
I've got the new autocomplete widget in jQuery UI 1.8rc3 working great in Firefox. It doesn't work at all in IE. Can someone help me out?
HTML:
<input type="text" id="ctrSearch" size="30">
<input type="hidden" id="ctrId">
Javascript:
$("#ctrSearch").autocomplete({
source: "ctrSearch.do",
minLength: 3,
focus: function(event, ui){
$('#ctrSearch').val(ui.item.ctrLastName + ", " + ui.item.ctrFirstName);
return false;
},
select: function(event, ui){
$('#ctrId').val(ui.item.ctrId);
return false;
}
});
Result (IE 8):
The red box is the <ul> element created by jQuery.
I also get this error:
Line: 116
Error: Invalid argument.
When I open it in the IE8 script debugger, it highlights f[b]=d on line 116 of jquery.min.js. Note that I'm using version 1.4.2 of jQuery hosted on Google's servers (https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js).
I've tried removing some of the options, but even when I call .autocomplete() with no options, or with only the source option, I still get the same result.
Once again, it's working in Firefox, but not in IE. Any suggestions?
Thanks.