Jump to content

disable radio group and checkboxes


NickG21

Recommended Posts

hey everyone here is my code for a function to disable a set of radio buttons.  i was wondering if anyone could help me and try to elaborate on how i could disable a group of checkboxes at the same time when this one checkbox is checked.
[code]

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
  }
}
}[/code]
onClick="DisableRadioGroup(ServiceName)"
Link to comment
https://forums.phpfreaks.com/topic/32571-disable-radio-group-and-checkboxes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.