adamthenewbie
Programmer
I have these 4 radio buttons
<input type="radio" name="branch" value="nb" checked> NB
<input type="radio" name="branch" value="ns"> NS
<input type="radio" name="branch" value="none"> Non Member
<input type="radio" name="branch" id = "branch" value="other"> <input class = "textbox2" type="text" name="other_branch" value = "<? echo $other_branch; ?>" size="10" onFocus="java script: selectOther();" />
The last radio button I want it to be selected if the user clicks on the TExt Area beside it.
So I have this function which gets called onFocus
<script language="JavaScript">
<!--
function selectOther() {
document.forms[0].branch.checked;
}
//-->
</script>
What is the proper code to select the radio button?
<input type="radio" name="branch" value="nb" checked> NB
<input type="radio" name="branch" value="ns"> NS
<input type="radio" name="branch" value="none"> Non Member
<input type="radio" name="branch" id = "branch" value="other"> <input class = "textbox2" type="text" name="other_branch" value = "<? echo $other_branch; ?>" size="10" onFocus="java script: selectOther();" />
The last radio button I want it to be selected if the user clicks on the TExt Area beside it.
So I have this function which gets called onFocus
<script language="JavaScript">
<!--
function selectOther() {
document.forms[0].branch.checked;
}
//-->
</script>
What is the proper code to select the radio button?