E' una moltiplicazione tra campi di input di una form.
Devo calcolare da 3 inputbox il risultato:
RIS = (text1(LU) * text2(LA) * text3(H)) * 45
dov'è che sbaglio??
<head>
<script>
function updatethis(prova) {
LU=document.prova.master; // campo di inserimento
LA=document.prova.master;
H=document.prova.master;
prova.elements['RIS'].value=(prova.elements['LU'].value*prova.elements['LA'].value*prova.elements['H'].value)*45;
}
</script>
</head>
<body>
<form name="prova" id="prova">
Inserisci la LUNGHEZZA in metri
<input type="text" name="LU" id="LU" onChange="updatethis(LU.form);" />
Inserisci la LARGHEZZA in metri
<input type="text" name="LA" id="LA" onChange="updatethis(LA.form);" />
Inserisci la ALTEZZA in metri
<input type="text" name="H" id="H" onChange="updatethis(H.form);" />
<input type="button" onChange="updatethis("PROVA.form") name="RIS" id="RIS" value="CALCOLA FABBISOGNO" />
Il suo bagno ha bisogno di <input type="text" name="RIS" id="RIS" > watt
</form>
</form>
</body>