Bom dia,
Preciso fazer uma tabela aonde dependendo da marcação outras são desativadas.
consegui usando as informações disponibilizadas pelo fórum chegar ao um código q faz isso.
o problema é que após eu desmarcar a opção as outras nao podem mais ser marcadas.
Ex-> ao marcar "segunda", terça e quarta são desabilitados. porém se eu quiser voltar e desmarcar segunda para marcar teça ou quarta, não posso mais.
tenho pouca experiencia nessa área, estou ajudando um amigo.
se alguém souber como fazer para corrigir isso agradeço muito.
segue o código:
<form>
<form id="MODALIDADES">
<table class="tg">
<tr>
<th class="tg-baqh"><b>MODALIDADES <b></th>
<th class="tg-baqh"><b>SEGUNDA<b></th>
<th class="tg-baqh"><b>TERÇA<b></th>
<th class="tg-baqh"><b>QUARTA<b></th>
<th class="tg-baqh"><b>QUINTA<b></th>
</tr>
<td class="tg-dzk6"><b>JUDO I <font size="1">(SEGUNDAS E QUARTAS)</font><b></td>
<td><center> <input type='checkbox' name='SEGUNDA' id='SEGUNDA' value='1' onclick="teste2(this);" /></td>
<td><center> <input type='checkbox'name='TERÇA' id='TERÇA' value='1' onclick="teste2(this);" /></td>
<td><center> <input type='checkbox' name='QUARTA' id='QUARTA' value='1' onclick="teste2(this);" /></td>
<td><center> <input type='checkbox' name='QUARTA' id='QUINTA' value='1' onclick="teste2(this);" /></td>
</tr>
<td class="tg-dzk6"><b>CAPOEIRA <font size="1">(SEGUNDAS E QUARTAS)</font><b></td>
<td><center> <input type='checkbox' name='SEGUNDA II' id='SEGUNDA II' value='1' onclick="teste2(this);" /></td>
<td><center> <input type='checkbox' name='TERÇA II' id='TERÇA II' value='1' onclick="teste2(this);" /></td>
<td><center> <input type='checkbox' name='QUARTA II' id='QUARTA II' value='1' onclick="teste2(this);" /></td>
<td><center> <input type='checkbox' name='QUINTA II' id='QUINTA II' value='1' onclick="teste2(this);" /></td>
</table><center>
<script language="javascript">
</script>
<script language="javascript">
function teste2(obj)
{
if (obj.checked == true)
{
if (obj.id == 'SEGUNDA')
{
document.getElementById('TERÇA').disabled = true;
document.getElementById('SEGUNDA II').disabled = true;
}
}
}
</script>
</form>