How can I create an editable combo box in HTML/Javascript?

Posted by Christian Davén on Stack Overflow See other posts from Stack Overflow or by Christian Davén
Published on 2010-06-16T09:39:26Z Indexed on 2010/06/16 9:42 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

I need to let users select an item from a dropdown list, but also allow them to instead enter any text, even if it doesn't match an item in the list. How can I achieve this on a web page with HTML and Javascript?

The select field doesn't let users enter text, and the input text field doesn't show the preferred alternatives.

All items must show if the user opens the dropdown, so it can't be a simple auto-complete that only shows matching items.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html