Focal Point
Radio Buttons and JavaScript

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3801028331

December 20, 2004, 11:32 AM
CHERI
Radio Buttons and JavaScript
Good Morning:
A JavaScrip question for anyone. I have two different sets of radio buttons, each having two radio buttons associated to them. If the second value of the 1st set of radio buttn is selected I would like both values on the 2nd set of radio button to become disabled. Anyone have any suggestions. Thanks
December 21, 2004, 07:59 AM
<Grzegorz>
An example:
<html><br /><head><br />	<title>Radio Buttons</title><br /><script type="text/javascript"><br />function disableButtons(mode) {<br />  var buttons = document.radioForm.set02;<br />  for (var i=0; i < buttons.length; i++) {<br />    buttons[i].disabled = mode;<br />  }<br />}<br /></script>	<br /></head><br /><br /><body><br /><form name="radioForm"><br /><table><br /><tr> <td align="right">First Radio Set:</td><br /><td>Button1<input type="radio" name="set01"<br />                  onclick="disableButtons(false)"/></td><br /><td>Button2<input type="radio" name="set01" <br />                  onclick="disableButtons(true)"/></td><br /></tr><br /><tr> <td align="right">Second Radio Set:</td><br /><td>Button1<input type="radio" name="set02"/></td><br /><td>Button2<input type="radio" name="set02"/></td><br /></tr><br /></table><br /></form><br /></body><br /></html>