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.
UPDATE: As suggested, I used jquery.js (instead of jquery.min.js) and got the error on line 4618. See jitter's answer below. Please see this other Stack Overflow question that was posted a few days ago.
UPDATE 2: I discovered that jQuery UI autocomplete uses an invalid property this.element.height
, when it should be using the function this.element.height()
If I understand this right the line you refer to seems to be the line 4618 in jquery.1.4.2.js in the style
function. Which can only mean that the Autocompleter plugin tries to set a style value that IE8 doesn't understand or doesn't allow to be accessed/changed in this way.
style[ name ] = value; //style == elem.style from the passed in element