Buongiorno a tutti, chi sa dirmi perchè il seguente codice non avvia lo script onload nonostante lo stesso funzioni benissimo onblur?
codice:
<html>
<head>
</head>
<script type="text/javascript">
function calcola_TOTAL(ff) {
var OP = parseFloat(ff.operating.value);
var LEG = parseFloat(ff.legal.value);
ff.totalcostestimate.value = (OP+LEG);
}
</script>
<body onload="calcola_TOTAL(this.form);">
<form name="form1" method="post" action="" >
<table border="0">
</table>
<table border="0">
<tr>
<td>Operating</td>
<td>
<input name="operating" type="text" id="operating" size="15" value="3" onblur="calcola_TOTAL(this.form);">
</td>
</tr>
<tr>
<td>Legal</td>
<td>
<input name="legal" type="text" id="legal" size="15" value="4" onblur="calcola_TOTAL(this.form);">
<input name="financial" type="hidden" value="0">
</td>
</tr>
<tr>
<td>TOTAL COST ESTIMATE </td>
<td>
<input name="totalcostestimate" type="text" id="totalcostestimate" size="15" style="background-color: #EBEBEB; font-size: 16px; font-weight: bold;" readonly>
</td>
</tr>
</table>
</form>
</body>
</html>
Grazie per l'interessamento,
AleX