![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Man Bear Pig Hunter
Join Date: Jul 2005
Location: NorCal, USA
Posts: 292
Rep Power: 4
![]() |
Disable Drop Downlist Using Radio Buttons
Hey I need some help...a lot of help with JavaScript.
I need it so when Yes is selected from a radio button list, the drop down list then becomes enabled and when no is selected it becomes disabled. Here are the elements I have. I need the javascript code.... Radio Buttons -------------------------------- <table id="_ctl0_RadioButtonListSalesAgent" onClick="enableDisable()" border="0" style="height:40px;width:240px;"> <tr> <td><input id="_ctl0_RadioButtonListSalesAgent_0" type="radio" name="_ctl0:RadioButtonListSalesAgent" value="1" /><label for="_ctl0_RadioButtonListSalesAgent_0">Yes, and my agents name is:</label></td> </tr><tr> <td><input id="_ctl0_RadioButtonListSalesAgent_1" type="radio" name="_ctl0:RadioButtonListSalesAgent" value="0" checked="checked" /><label for="_ctl0_RadioButtonListSalesAgent_1">No, please assign an agent.</label></td> </tr> </table> Dropdown List ------------------ <select name="_ctl0:DropDownListSalesAgent" id="_ctl0_DropDownListSalesAgent" disabled="disabled" class="PhoneEdit" style="width:200px;"> <option value="User1">User1</option> <option value="User2">User2</option> </select> Thank you javascript people. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|