0

I need to customize the combobox widget build from the jQuery UI Autocomplete http://jqueryui.com/demos/autocomplete/#combobox

Currently drop down options are predefined from the SELECT tag OPTIONS or from a JSON array.

//getter
var source = $( ".selector" ).autocomplete( "option", "source" );
//setter
$( ".selector" ).autocomplete( "option", "source", ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] );

I want to populate the combobox options from a Ajax URL, how can i customize the widget?

1 Answer 1

3

There is a demo on how to do this via AJAX, you should just make sure your array is JSON encoded before it is returned to the autocomplete component.

If you're using PHP, take a look at the json_encode function.

Does this answer your question?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.