|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello everyone!
Could you tell me if it's possible to create an editable combobox (that means a combobox in witch you can type in text) with Javascript and HTML scripts ? If it is possible, could you tell me the way to do it, because I couldn't find any answer by myself on the net ? Thanks for helping me ! ------------------ Grégoire Blanc Dreamcast Audio Programer No Cliché http://www.nocliche.com |
|
#2
|
|||
|
|||
|
Combo boxes are designed to contain pre-defined and thus uneditable data.
Having said that there is a way to do it, altough not very intuitive and without knowing the reason behind your desire to do it I would recommend against it. You need a input field of type text, the user enters a description in the field, then clicks submit, rather than the submit button triggering a POST or a GET it calls a JavaScript function whihc takes the value of the text field and appends it to an array. It takes the values in the array and builds the required html code for a combo box, then writes the html code out to the page. The user can then enter another description etc. If you want a value assigned to the description in the combo box supply 2 text fields or you could increment a counter variable in your code and assign it's value to the combo box. HTH Graham |
|
#3
|
|||
|
|||
|
Hello Graham,
Sorry not having answered you earlier; but, I thank you a lot for having tried to help me : My need was to allow a user to type in a command number or choose one that he had already prepared. That's why an editable combobox was suitable. I found a solution that consists in keeping the initial input field, which is an edit box, and, beside, to create a simple combobox : It's like the solution you proposed to me. Yet I thank you and wish you good day ! ------------------ Grégoire Blanc Dreamcast Audio Programer No Cliché http://www.nocliche.com |
|
#4
|
|||
|
|||
|
Hello Graham,
Sorry not having answered you earlier; but, I thank you a lot for having tried to help me : My need was to allow a user to type in a command number or choose one that he had already prepared. That's why an editable combobox was suitable. I found a solution that consists in keeping the initial input field, which is an edit box, and, beside, to create a simple combobox : It's like the solution you proposed to me. Yet I thank you and wish you good day ! ------------------ Grégoire Blanc Dreamcast Audio Programer No Cliché http://www.nocliche.com |
|
#5
|
|||
|
|||
|
Hello Graham,
Sorry not having answered you earlier; but, I thank you a lot for having tried to help me : My need was to allow a user to type in a command number or choose one that he had already prepared. That's why an editable combobox was suitable. I found a solution that consists in keeping the initial input field, which is an edit box, and, beside, to create a simple combobox : It's like the solution you proposed to me. Yet I thank you and wish you good day ! ------------------ Grégoire Blanc Dreamcast Audio Programer No Cliché http://www.nocliche.com |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > editable combo box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|