V
vinceg
I would like to offer a test on a form which will provide the viewer with a
result after they enter some values, and 'Click Here.'
I made up a simple form with 2 input fields, a hidden field with a
multiplier value in it, an answer field and 'Click Here' text item.
When the viewer enters their data, I want the 'Click Here' to add the 2
entered values, and multiply it by the hidden value, and then place the
result in the 'Total' field.
I presume the 'Click Here' click event would call a java script, bu I don't
know how to write it, where to place it, etc.
Any help you can provide will be appreciated. The code is below.
Thanks,
Vince G.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<form>
<input type="hidden" name="T3" size="20" value="5"><p>Enter your first digit
here:
<input type="text" name="T1" size="20" value="0"></p>
<p>Enter your second digit here:
<input type="text" name="T2" size="20" value="0"></p>
<p>
</p>
<p>Click Here to get your answer</p>
<p>Your total will appear here:
<input type="text" name="Total" size="20" value="0"></p>
</form>
</body>
</html>
result after they enter some values, and 'Click Here.'
I made up a simple form with 2 input fields, a hidden field with a
multiplier value in it, an answer field and 'Click Here' text item.
When the viewer enters their data, I want the 'Click Here' to add the 2
entered values, and multiply it by the hidden value, and then place the
result in the 'Total' field.
I presume the 'Click Here' click event would call a java script, bu I don't
know how to write it, where to place it, etc.
Any help you can provide will be appreciated. The code is below.
Thanks,
Vince G.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<form>
<input type="hidden" name="T3" size="20" value="5"><p>Enter your first digit
here:
<input type="text" name="T1" size="20" value="0"></p>
<p>Enter your second digit here:
<input type="text" name="T2" size="20" value="0"></p>
<p>
</p>
<p>Click Here to get your answer</p>
<p>Your total will appear here:
<input type="text" name="Total" size="20" value="0"></p>
</form>
</body>
</html>