tags:

views:

111

answers:

2
<link rel="stylesheet" type="text/css" href="jquery-ui-1.8.2.custom.css" />
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>


<body>
Search: <input id="example" /> 
</body>

<script>
$(document).ready(function(){
var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$("#example").autocomplete(data);
});
</script>
A: 

And wheres jQuery UI?

Anpher
+2  A: 

Since your example is straight from the Autocomplete plugin page, I'm guessing that's the plugin your attempting to use. You'll need to download it and put it someplace where your code can use it.

<script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
<!-- You'll want to change this next line to your local copy of the plugin. -->
<script src="jquery.autocomplete.js"></script> 

Search: <input id="example" /> 

<script>
$(document).ready(function(){
var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$("#example").autocomplete(data);
});
</script>
Chip Tol
I do what you said and run the script in IE 8 and get error message after typing in the input field://error message from IE8 Webpage error detailsUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2) Timestamp: Mon, 7 Jun 2010 23:13:10 UTCMessage: Object expected Line: 570 Char: 394 Code: 0 URI: http://localhost/zhong/jquery-ui-1.8.2.custom.min.js
phil
I actually used the autocomplete(array) from jquery/plugins. But what I intended to use is autocomplete(source) from jquery/ui. The two autocomplete() have the same name, yet different parameters and different reference. That's why i made the mistake.
phil