nickg21
12-29-2006, 09:35 PM
hey everyone, this is my first post here the other forums i have been writing on haven't seemed to be able to help me with this problem. i am new at javascript and i am looking to disable a group of radio buttons as well as a group of checkboxes if one certain checkbox is clicked on my form. i have it working properly for the radio buttons but i am not sure of how to go about the other checkboxes. also there is 2 text boxes and a message box id like to disable. here is the code if anyone can help me it would be greatly appreciated.
<!--
function DisableRadioGroup(radioGroup, disable)
{
if(document.getElementById("OwnersManual").checked == true){
for(var i=0; i < radioGroup.length; i++)
{
radioGroup[i].disabled = true
}
}
else
{
for(var i=0; i < radioGroup.length; i++)
{
radioGroup[i].disabled = false
}
}
}
//-->
<input type="checkbox" ID="OwnersManual" value="ResendOwnersManual" onClick="DisableRadioGroup(ServiceName)">
the name of the checkboxes is name="ReasonsForCancellation"
thanks again in advance
<!--
function DisableRadioGroup(radioGroup, disable)
{
if(document.getElementById("OwnersManual").checked == true){
for(var i=0; i < radioGroup.length; i++)
{
radioGroup[i].disabled = true
}
}
else
{
for(var i=0; i < radioGroup.length; i++)
{
radioGroup[i].disabled = false
}
}
}
//-->
<input type="checkbox" ID="OwnersManual" value="ResendOwnersManual" onClick="DisableRadioGroup(ServiceName)">
the name of the checkboxes is name="ReasonsForCancellation"
thanks again in advance