Mpow540 said:
I have a form that users fill out and I want the results to display
below the form on the same page?
How can this be done? Is there a DB involved?
Thanks,
Matt
I see no reason why you can't write some JS to do this.
Set up extra fields in the form, then a button to click to cause the JS to
generate the results and write them into the fields.
e.g.,
The form is named 'form1', and has item1, item2, item3 and a blank field for
total.
You want to add item1, item2, item3 and place in total:
The code may look like this;
<head>
<script type="text/javascript">
function addform()
{
with (document.form1)
{ total.value = +item1.value + item2.value + item3.value }
}
</script>
</head>
<body>
<form id="form1" name="form1" action="" >
Value1: <input type="text" id="item1" name="item1" value="" size="10"
/><br/>
Value2: <input type="text" id="item2" name="item2" value="" size="10"
/><br/>
Value3: <input type="text" id="item3" name="item3" value="" size="10"
/><br/>
<input type="button" id="submit" name="submit" value=" Add "
onclick="addform()" />
<input type="reset" id="reset" name="reset" value=" Clear " />
<br/><br/>
Total: <input type="text" id="total" name="total" value="0" size="11"
/><br/>
</form>
If you are you looking for more specific code, please supply more details.