I’ve used jQuery UI’s autocomplete in the past, but for some reason I can’t get it to do anything with a TextBox. There are no script errors, and to register it, I’m using:
jQuery('#textbox1').autocomplete('/Services/BillService.asmx/GetAllCategories',{
search: function(event, ui) { alert(0); },
create: function(event, ui) { alert(2); },
open: function(event, ui) { alert(1); },
focus: function(event, ui) { alert(3); }
});
Yet nothing happens when I select/type in the textbox. The HTML I have is:
<input type="text" class="marg10b" id="textbox1" name="textbox1"/>
If I run the script in firebug, one element is matched and i is the correct element, yet something is preventing this from working.
I’m going to assume you’re using jQueryUI’s autocomplete. If that’s the case, you need to populate the
sourceoption when you initialize the plugin: