Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do not want the submit button to refresh the page.

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi,

This is the form and the included objects. All I want to do is allow the submit buttons on the buttom to trigger the two methods after clicking or submitting. I don't want it to refresh the page so to not lose the values in the text boxes and drop downs.

<td width="20%"><form action="" method="post" name="frmCalc" id="frmCalc">
<div align="center">
<p><font size="2" face="Arial, Helvetica, sans-serif"><strong>Charges</strong></font></p>
<p align="left"><strong><font size="2" face="Arial, Helvetica, sans-serif">Sub
Total:
<input name="txtSubTotal" type="text" id="txtSubTotal" style="width:50px;" value="<% Response.Write ("0") %>">
</font></strong></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Discount
%: </strong>
<input name="txtDiscount" type="text" id="txtDiscount" style="width:50px;" value="<% Response.Write ("0") %>">
</font></p>
<p align="left"> <font size="2" face="Arial, Helvetica, sans-serif"><strong>Extra
Charges:
<input name="txtExtraCharges" type="text" id="txtExtraCharges" style="width:50px;" value="<% Response.Write ("0") %>">
</strong></font></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Total
Cost:
<input name="txtTotal" type="text" id="txtTotal" style="width:70px;" value="<% Response.Write ("0") %>">
</strong></font></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Amount
Paid:
<input name="txtAmtPaid" type="text" id="txtAmtPaid" style="width:70px;" value="<% Response.Write ("0") %>">
</strong></font></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>
Unpaid:
<input name="txtUnpaid" type="text" id="txtUnpaid" style="width:70px;" value="<% Response.Write ("0") %>">
</strong></font></p>
<p align="left"><strong><font size="2" face="Arial, Helvetica, sans-serif">
<input name="pCalculate" type="submit" id="pCalculate" value="Calculate" onSubmit="Calculate()">
<input name="pReset" type="submit" id="pReset" value="Reset" onSubmit="Reset()">
</font></strong></p>
</div>
</form></td>


Mo
 
also you will have to change the onSubmit to onClick


Keith


The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top