Solutions to Professional jQuery based Combobox control? focused on using input as a means of filtering and autocompleting an existing selection value.
If you are looking for a traditional combo box that simply “Enter something or select from these predefined values” (no, we will not hide those that do not match during input) all you might need is
<select id="combo4" style="width: 200px;"
onchange="$('input#text4').val($(this).val());">
<option>option 1</option>
<option>option 2</option>
<option>option 3</option>
</select>
<input id="text4"
style="margin-left: -203px; width: 180px; height: 1.2em; border: 0;" />
See
http://bit.wisestamp.com/uncategorized/htmljquery-editable-combo-2/
It should be easy to wrap this in a plugin that converts an existing select tag, although I haven't seen it yet.
source
share