|
How to switch input based on a drop down
I have a form with 2 drop down menus. In the first drop down, the user can select A, B, or C.
If they select A, then I want the second drop down menu to stay as a drop down menu. But if they select B or C, the drop down menu should become a text input field so that they can input their own information.
Is it possible with JavaScript to change the type of input field for the second input based on what is selected in the first drop down?
I am a competent PHP/MySQL coder, but I am extremely new to JavaScript, so if anyone can answer this question, please keep the explanation simple.
Thanks for any advice. I hope someone can point me to a tutorial or example.
|