schnitzel_ESC
12-21-2003, 07:01 PM
hi, i', trying to build a speed/rpm/reduction calculator, i have all the formulae, but i can't work out how to make all the formulae 'go' with the click of one button,
here is an example form that i come up with:
<form name="calc2">
A: <input type="text" name="A" size="10"> <br>
B: <input type="text" name="B" size="10"> <br>
<input type="button" name="add" value="="
onClick="document.calc2.C.value =
parseInt(document.calc2.B.value) +
parseInt(document.calc2.A.value)";
"document.calc2.D.value =
parseInt(document.calc2.B.value) -
parseInt(document.calc2.A.value)"> <br>
C: <input type="text" name="C" size="10"><br>
D: <input type="text" name="D" size="10">
</form>
i want to be able to click the button, and to have A+B in C, and A-B in D. Could you please edit this form, to make it work correctly. Thanks
Nigel:)
.::14 YEAR OLD::.
here is an example form that i come up with:
<form name="calc2">
A: <input type="text" name="A" size="10"> <br>
B: <input type="text" name="B" size="10"> <br>
<input type="button" name="add" value="="
onClick="document.calc2.C.value =
parseInt(document.calc2.B.value) +
parseInt(document.calc2.A.value)";
"document.calc2.D.value =
parseInt(document.calc2.B.value) -
parseInt(document.calc2.A.value)"> <br>
C: <input type="text" name="C" size="10"><br>
D: <input type="text" name="D" size="10">
</form>
i want to be able to click the button, and to have A+B in C, and A-B in D. Could you please edit this form, to make it work correctly. Thanks
Nigel:)
.::14 YEAR OLD::.