Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Multiplying two input fields
07-20-2010, 08:04 PM #1
- Join Date
- Jul 2010
- Thanked 0 Times in 0 Posts
Multiplying two input fields
I would like to create a form that calculates the area of a floor or wall. The user will input the length/height and width dimensions into two input fields and then click calculate.
I simply need a script that multiplies the two fields together and puts the answer in a third read-only field.
Any help much appriciated
Kind regards, Mike
07-20-2010, 08:28 PM #2Code:
<form> Width: <input name="width" /><br/> Length: <input name="length" /><br/> Area: <input name="area" readonly /><br/> <input type="button" value="Compute Area" onclick="this.form.area.value = this.form.width.value * this.form.length.value;" /> </form>An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.