views:

65

answers:

1

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.

+2  A: 

Here is a script for that: http://www.dhtmlgoodies.com/scripts/form_widget_editable_select/form_widget_editable_select.html

Or another one which works slightly differently: http://www.ridgway.co.za/archive/2005/10/15/aneditablehtmlselectlist.aspx

Tom Gullen
Thanks! I'm going with the first script.
Christian Davén