Tem um código bem simples aqui que calcula a nota de acordo com as opções e em tempo real mostra lá embaixo no campo Nota só que não está funcionando, alguém ajuda?
<html>
<script type="text/javascript">
function calcularNotas(){
var notaCalculada = 0.0;
var notaSomatorioProf = 0.0;
var notaSomatorioMonit = 0.0;
if (document.getElementById('prof_30').checked) notaSomatorioProf = 10;
else if (document.getElementById('prof_20').checked) notaSomatorioProf = 9;
else if (document.getElementById('prof_15').checked) notaSomatorioProf = 8;
else if (document.getElementById('prof_10').checked) notaSomatorioProf = 6;
else if (document.getElementById('prof_05').checked) notaSomatorioProf = 5;
else if (document.getElementById('prof_00').checked) notaSomatorioProf = 0;
if (document.getElementById('monit_30').checked) notaSomatorio = 4;
else if (document.getElementById('monit_20').checked) notaSomatorioMonit = 3;
else if (document.getElementById('monit_15').checked) notaSomatorioMonit = 2;
else if (document.getElementById('monit_10').checked) notaSomatorioMonit = 1;
else if (document.getElementById('monit_05').checked) notaSomatorioMonit = 0.5;
else if (document.getElementById('monit_00').checked) notaSomatorioMonit = 0;
document.getElementById('nota_somatorio').value = notaSomatorioProf + notaSomatorioMonit;
if ( (notaSomatorioProf + notaSomatorioMonit) > 10) notaCalculada = 10.0;
else notaCalculada = notaSomatorioProf + notaSomatorioMonit;
document.getElementById('nota_calculada').value = notaCalculada;
}
</script>
<table border="0" width="800">
<tr>
<td>
<table align="center" id="tabelaExp" border="1">
<tr>
<th align="center">Atividade</th>
<th width="65"> >=3A</th>
<th width="65"> 2A</th>
<th width="65"> 1,5A</th>
<th width="65"> 1A</th>
<th width="65"> 0,5A</th>
<th width="65">Nenhum</th>
</tr>
<tr>
<td align="left">Professor terceiro grau na área afim</td>
<td align="center"><input type="radio" name="prof" id="prof_10.0" value="10" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="prof" id="prof_9.0" value="9" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="prof" id="prof_8.0" value="8" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="prof" id="prof_6.0" value="6" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="prof" id="prof_5.0" value="5" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="prof" id="prof_0.0" value="0" onchange="calcularNotas()"></td>
</tr>
<tr>
<td align="left">Monitoria</td>
<td align="center"><input type="radio" name="monit" id="monit_4.0" value="4" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="monit" id="monit_3.0" value="3" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="monit" id="monit_2.0" value="2" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="monit" id="monit_1.0" value="1" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="monit" id="monit_0.5" value="0.5" onchange="calcularNotas()"></td>
<td align="center"><input type="radio" name="monit" id="monit_0.0" value="0" onchange="calcularNotas()"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
Nota: <input type="text" name="nota" id="nota" readonly="readonly"></input></td></td>
</table>
</form>
</body>
</html>
