Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#yourselector").autocomplete({
- source: "your URL",
- minLength: 2,
- select: function(event, ui) {
- $('#selector').val(ui.item.YourDataResponse);
- $('#selector').val(ui.item.YourDataResponse);
- }
- });
- // Destroy the combobox
- $(".combobox").combobox("destroy");
- // Unselect the currently selected option
- $("#selectlist option:selected").removeAttr("selected");
- // Select the option you want to select
- $("#selectlist option[value='test']").attr("selected", "selected");
- // Create the combobox again
- $(".combobox").combobox();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement