AyooshJ
asked on
JavaScript- Radio Button and Text Field events
Hi,
I need a Java script which disables text field for certain radio button selection.
For example,(In our below code)
If any of the first 4 selections (1 MONTH SALES , 1 MONTH QTY , 2 MONTHS SALES, 2 MONTHS QTY) is selected then only the bottom 2 text fields (YEAR RANGE , YEAR RANGE 2 ) must be disabled.
If any of the last 2 fields is selected (ANNUAL SALES , ANNUAL QTY) then no text field is disabled.
Thanks!
I need a Java script which disables text field for certain radio button selection.
For example,(In our below code)
If any of the first 4 selections (1 MONTH SALES , 1 MONTH QTY , 2 MONTHS SALES, 2 MONTHS QTY) is selected then only the bottom 2 text fields (YEAR RANGE , YEAR RANGE 2 ) must be disabled.
If any of the last 2 fields is selected (ANNUAL SALES , ANNUAL QTY) then no text field is disabled.
Thanks!
<html>
<body>
<td>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr><td class=tbl_header><a href="#" style="-decoration:nonecolor:FF6600" title="SALES OR QUANTITY">SALES</a></td></tr>
<tr><td>
<input type="radio" value="1mnth_rev" name="sh_actual" checked>1 MONTH SALES
</td></tr>
<tr><td>
<input type="radio" value="1mnth_vol" name="sh_actual">1 MONTH QTY
</td></tr>
<tr><td>
<input type="radio" value="2mnth_rev" name="sh_actual">2 MONTHS SALES
</td></tr>
<tr><td>
<input type="radio" value="2mnth_vol" name="sh_actual">2 MONTHS QTY
</td></tr>
<tr><td>
<input type="radio" value="ann_rev" name="sh_actual">ANNUAL SALES
</td></tr>
<tr><td>
<input type="radio" value="ann_vol" name="sh_actual">ANNUAL QTY
</td></tr>
<tr><td>  </td></tr>
<tr><td>  </td></tr>
<tr><td>  </td></tr>
<tr><td>  </td></tr>
<tr><td>  </td></tr>
</table>
</td><td>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr><td class=tbl_header colspan=2><A href="#" style="-decoration:nonecolor:FF6600" title="RANGE">RANGE MONTH</A></td></tr>
<tr><td>1 MONTH
</td><td>
<input type= size=10 name="act_one_mnth" value=>
</td></tr>
<tr><td>2 MONTH
</td><td>
<input type= size=10 name="act_two_mnth" value=>
</td></tr>
<tr><td class=tbl_header colspan=2><a href="#" style="-decoration:nonecolor:FF6600" title="ANNUAL RANGE">RANGE YEARLY</a></td></tr>
<tr><td>YEAR RANGE
</td><td>
<input type= size=10 name="act_one_yr" value=>
</td></tr>
<tr><td>YEAR RANGE 2
</td><td>
<input type= size=10 name="act_two_yr" value=>
</td></tr>
</table>
</td></tr>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thank you so much for the kind words, the grade & the points.
Good luck & have a great day
Good luck & have a great day
ASKER