I have a small script that i need to expand it....this would be used to calculate the metric system. the first one works.
<form>
F: <input type="text" onchange="eval('C.value = ' + this.form.C_expr.value)" value="32" name="F">
<input type="hidden" value="(212-32)/100 * C.value + 32 " name="F_expr">
<br>
C: <input type="text" onchange="eval('F.value = ' + this.form.F_expr.value)" value="0" name="C">
<input type="hidden" value="100/(212-32) * (F.value - 32 )" name="C_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
I am using this small script to calculate fahrenheit to celcius works both ways...
can someone help this javascript newbie to come up with the same format to calculate
Height
inches to centimeters formula is _ inches x 254 cm
what i have so far.
<form>
I: <input type="text" onchange="eval('CM.value = ' + this.form.CM_expr.value)" value="32" name="I">
<input type="hidden" value="(212-32)/100 * CM.value + 32 " name="I_expr">
<br>
CM: <input type="text" onchange="eval('I.value = ' + this.form.I_expr.value)" value="0" name="CM">
<input type="hidden" value="100/(212-32) * (I.value - 32 )" name="CM_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
volume
ounzes to milliliters formula is __oz x 30cc
<form>
O: <input type="text" onchange="eval('M.value = ' + this.form.M_expr.value)" value="32" name="O">
<input type="hidden" value="(212-32)/100 * M.value + 32 " name="O_expr">
<br>
M: <input type="text" onchange="eval('O.value = ' + this.form.O_expr.value)" value="0" name="M">
<input type="hidden" value="100/(212-32) * (O.value - 32 )" name="M_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
Weight to kilograms formula ___lbs. divide by 2.2
<form>
<h3>Weight</h3>
W: <input type="text" onchange="eval('K.value = ' + this.form.K_expr.value)" value="2.2" name="W">
<input type="hidden" value=" * 1 K.value * 2.2 " name="W_expr">
<br>
K: <input type="text" onchange="eval('W.value = ' + this.form.W_expr.value)" value="1" name="K">
<input type="hidden" value=" /2.2 (W.value / 2.2)" name="K_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
<form>
F: <input type="text" onchange="eval('C.value = ' + this.form.C_expr.value)" value="32" name="F">
<input type="hidden" value="(212-32)/100 * C.value + 32 " name="F_expr">
<br>
C: <input type="text" onchange="eval('F.value = ' + this.form.F_expr.value)" value="0" name="C">
<input type="hidden" value="100/(212-32) * (F.value - 32 )" name="C_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
I am using this small script to calculate fahrenheit to celcius works both ways...
can someone help this javascript newbie to come up with the same format to calculate
Height
inches to centimeters formula is _ inches x 254 cm
what i have so far.
<form>
I: <input type="text" onchange="eval('CM.value = ' + this.form.CM_expr.value)" value="32" name="I">
<input type="hidden" value="(212-32)/100 * CM.value + 32 " name="I_expr">
<br>
CM: <input type="text" onchange="eval('I.value = ' + this.form.I_expr.value)" value="0" name="CM">
<input type="hidden" value="100/(212-32) * (I.value - 32 )" name="CM_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
volume
ounzes to milliliters formula is __oz x 30cc
<form>
O: <input type="text" onchange="eval('M.value = ' + this.form.M_expr.value)" value="32" name="O">
<input type="hidden" value="(212-32)/100 * M.value + 32 " name="O_expr">
<br>
M: <input type="text" onchange="eval('O.value = ' + this.form.O_expr.value)" value="0" name="M">
<input type="hidden" value="100/(212-32) * (O.value - 32 )" name="M_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>
Weight to kilograms formula ___lbs. divide by 2.2
<form>
<h3>Weight</h3>
W: <input type="text" onchange="eval('K.value = ' + this.form.K_expr.value)" value="2.2" name="W">
<input type="hidden" value=" * 1 K.value * 2.2 " name="W_expr">
<br>
K: <input type="text" onchange="eval('W.value = ' + this.form.W_expr.value)" value="1" name="K">
<input type="hidden" value=" /2.2 (W.value / 2.2)" name="K_expr">
<br>
<input type="reset" value="reset" name="reset"> <input type="button" value="convert" name="">
</form>