[AutoComplete] Error in IE8
Getting this error in IE8, didn't check other IE versions. Works in FF. Any ideas?
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Timestamp: Fri, 5 Mar 2010 18:16:05 UTC
Message: 'name' is null or not an object
Line: 12072
Char: 6
Code: 0
URI:
http://dev-cf1/Derek/index.cfm
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="assets/js/jquery.autocomplete.css" type="text/css" rel="stylesheet" />
<script src="assets/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="assets/js/jquery.autocomplete.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var data = [ {name:'.metadata', url:'http://dev-cf1/.metadata'},{name:'211PalmBeach', url:'http://dev-cf1/211PalmBeach'},{name:'211Teen', url:'http://dev-cf1/211Teen'},{name:'3Dmachining', url:'http://dev-cf1/3Dmachining'},{name:'3i', url:'http://dev-cf1/3i'}, ];
$("#dirs").autocomplete(data, {
matchContains: false,
formatItem: function(item) {
return item.name;
}
}).result(function(event, item) {
location.href = item.url;
});
});
function changeOptions(){
if($('#chk').is(':checked')){
$("input#dirs").setOptions({
matchContains: true
});
} else {
$("input#dirs").setOptions({
matchContains: false
});
}
}
</script>
</head>
<body>
Start typing the DSN name, or <a href="http://cf-dev1/">go back to the original web root</a>.<br />
Match String anywhere in name? <input type="checkbox" id="chk" onclick="changeOptions();" /><br />
<input id="dirs" />
<div id="result"></div>
</body>
</html>