0

Hello,

I need to customize my select control to allow the user to enter something manually. Let's say I have this:

<select>
   <option value="volvo">Volvo</option>
   <option value="saab">Saab</option>
 </select>

I want to have another item in the select (first one), which, if selected, will allow the user to type in something himself.

I'm pretty sure I saw this somewhere. Is this possible?

Edited by Buffalo101: n/a

4
Contributors
12
Replies
14
Views
5 Years
Discussion Span
Last Post by Philippe.Lahaie
0

If it looks ugly, why don't you just customize the code? Also if you've solved this please make sure you select Solved so others know that you've managed to solve it!

0

As it turns out, this control fails to work correctly if more than one controls are on a page. Still looking for advice.

0

Could explain what you're intending to do better, then I might be able to help you easier. As I'm unsure of what you're trying to get at.

Thanks

1

I am trying to obtain the same thing as here: http://javascript.about.com/library/blnav7.htm, but without having two controls (input + dropdown list).

Did you read this article? It plainly states you cant combine two controls into one. And to create the combo box, you need that bit of javascript to catch the user's keystrokes to match the values in the select list.

Again, I personally know of no way to combine a textbox and select list into one control.

0

Yes, I read the article, but one person stating something doesn't make it irrefutable.

I will keep looking for alternatives and give an update. It would be probably simpler and neater looking to use various other controls for achieving what I want (radio button: predefined values or a new one).

Edited by Buffalo101: n/a

0

Maybe something like this?

Still uses jQuery, and I thought I had read you didnt want to use js, which is the reason for my above comment.

0

quickly what comes to my mind as a simple work arround would be an "other" option in your select that triggers some javascript when selected/deselected to show/hide a textbox on the side.

Edited by Philippe.Lahaie: n/a

0

http://chakrabarty.com/pp_editable_dropdown.html#3

http://www.ridgway.co.za/archive/2005/10/15/aneditablehtmlselectlist.aspx

looks like the 2 sites above did exactly what you want, except the first one didnt work for me in chrome, and the econd i didnt test.

this one is exactly what you want, works , and is extremly easy to make :

http://www.dhtmlgoodies.com/scripts/form_widget_editable_select/form_widget_editable_select.html <- came directly from google

Edited by Philippe.Lahaie: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.