Forum Moderators: open
<input type="radio" name="Import" value="1">
<input type="radio" checked name="Import" value="0"><input name=Match value="ID" type=checkbox>
<input name=Match value="Names" type=checkbox>
<input name=Match value="Profile" type=checkbox>
What is the code to disable the three checkboxes whenever the Impor raidio option is changed to 1 and enable them when its set to 0?
something along these lines might work:
<script language="JavaScript" type="text/JavaScript">
<!--
function chekMatch() {
var x=document.getElementById("Match");
x[0].checked = "true";
x[1].checked = "true";
x[2].checked = "true";
}
function unchekMatch() {
var x=document.getElementById("Match");
x[0].checked = "false";
x[1].checked = "false";
x[2].checked = "false";
}
//-->
</script><input type="radio" name="Import" value="1" onClick="unchekMatch()">
<input type="radio" checked name="Import" value="0" onClick="chekMatch()"><input name="Match" value="ID" type=checkbox checked>
<input name="Match" value="Names" type=checkbox checked>
<input name="Match" value="Profile" type=checkbox checked>
you could generalize it to use one method and passing a T/F flag and/or the form handle and/or the checkbox form element name.
you might also need to generalize the method for an arbitrary-length array of checkboxes.