Hi all
How can I make
<button onclick(someFunctionInTheJavascriptSection) >
update fields on the form, but not submit the form? Like this...
Height <input type="text" name="height" size="5"><br>
Width <input type="text" name="width" size="5"><br>
<button onclick(someFunctionInTheJavascriptSection) >Calculate Area</button>
Area = <input type="text" name="area" size="5" value="">
in the above example when the Calculate Area button is pressed, it will take the values from height and width and do the math and set the value to the Area input box.
I do not want the form to submit to a new screen, just simply call the java script function to do the calculation,
When I try this, the form submits to a blank form.
THanks in advance
Dean-O
How can I make
<button onclick(someFunctionInTheJavascriptSection) >
update fields on the form, but not submit the form? Like this...
Height <input type="text" name="height" size="5"><br>
Width <input type="text" name="width" size="5"><br>
<button onclick(someFunctionInTheJavascriptSection) >Calculate Area</button>
Area = <input type="text" name="area" size="5" value="">
in the above example when the Calculate Area button is pressed, it will take the values from height and width and do the math and set the value to the Area input box.
I do not want the form to submit to a new screen, just simply call the java script function to do the calculation,
When I try this, the form submits to a blank form.
THanks in advance
Dean-O