|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
I have a select box with several options. I also have a textbox which is disabled. I want the textbox to become enabled with the option labeled "Other" is selected. But I'm not sure how to do this since I have never tried enabling or disabling a textbox with anything other then a checkbox before. Any help will be appreciated.
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons |
|
#2
|
||||
|
||||
|
It's a lot easier than you think.
Using the onChange event handler of the SELECT item, call a function which checks the currently selected value (hint: dropdown[dropdown.selectedIndex].value) to see if it equals "Other". If so, enable the textarea (simple to do - google for "javascript disabled form") |
|
#3
|
||||
|
||||
|
I'm sorry to say I'm an idiot when it comes to JavaScript. If oyu could give me just a little bit more of a hint
|
|
#4
|
||||
|
||||
|
I've pretty much told you the key points - I'm not going to do it for you. Google can tell you the rest - there are plently of great Javascript reference sites around.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > enabling/disabling a textbox from a select box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|