Christian Davén Christian Davén - 1 year ago 85
HTML Question

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

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?


field doesn't let users enter text, and the
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.

Answer Source

Here is a script for that:

Or another one which works slightly differently: link removed (site no longer exists)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download