I’m trying to get JQueryUI’s autocomplete to work with an AJAX call to populate the source array.
however, I apparently I’m doing things out of order. How can I fix this so that it works?
(PageMethods returns its JSON list, but its not binding to the select)
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" />
<script type="text/javascript" >
$(".aaa").autocomplete({
source: list,
search: function(event, ui) {
PageMethods.FilterDropdown($(this).attr("id"), $(this).val(), OnSucceeded);
}
});
function OnSucceeded(result) {
list = result;
}
</script>
This appears to do it. I was missing a direct way to pass the callback to source: