rileggendo, hai radio e non checkbox, altro esempio
codice:
<script type="text/javascript" language="JavaScript">
<!--
function abilita_disabilita(which){
var els=document.menu.elements
for (var n=0;n<els.length;n++){
if(els[n].type=='checkbox' && els[n].name.indexOf('sub')>-1){
var theGroup=(els[n].name==which)?1:0;
els[n].disabled=(theGroup)?0:1;
if(!theGroup) els[n].checked=false;
}
}
}
//-->
</script>
<form name="menu">
<input type="radio" name="rd" onclick="abilita_disabilita('subck0')" />menu0
- <input type="checkbox" name="subck0" disabled="disabled" />submenu0
- <input type="checkbox" name="subck0" disabled="disabled" />submenu1
- <input type="checkbox" name="subck0" disabled="disabled" />submenu2
<input type="radio" name="rd" onclick="abilita_disabilita('subck1')" />menu1
- <input type="checkbox" name="subck1" disabled="disabled" />submenu0
- <input type="checkbox" name="subck1" disabled="disabled" />submenu1
- <input type="checkbox" name="subck1" disabled="disabled" />submenu2
</form>
ciao