I am creating a webpage that the opening page is a form. When you click the submit button on the form you go to the receiveorderform.asp that returns the values entered in the form on the opening page...
I need help creating a code for the receiveorderform.asp which includes a confirm button that takes the visitor to a Thank you for ordering page and a button that cancels the order and wipes out the values enter in the form and returns them to the first page. Below is the code for the
receiveorderform.asp page
Thanks in advance!
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%
function confirmReset() {
var resetForm = confirm(
"Are you sure you want to reset the form?"
;
if (resetForm == true)
return true;
return false;
}
%>
</head>
<body>
<H2> Products Ordered:</H2>
<P>Hammers Ordered: <%= Request.Form("hammers"
%></P>
<P>Clamps Ordered: <%= Request.Form("clamps"
%></P>
<P>Torches Ordered: <%= Request.Form("torches"
%></P>
<P>Axes Ordered: <%= Request.Form("axes"
%></P>
<P>Name: <%= Request.Form("chisels"
%></P>
<H2>Billing Information:</H2>
<P>Name: <%= Request.Form("name"
%></P>
<P>Billing Address: <%= Request.Form("address"
%></P>
<P>Shipping Address: <%= Request.Form("address2"
%></P>
<P>City: <%= Request.Form("city"
%></P>
<P>State: <%= Request.Form("state"
%></P>
<P>Zip: <%= Request.Form("zip"
%></P>
<P>Phone Number: <%= Request.Form("phone"
%></P>
<P>Email Address: <%= Request.Form("email"
%></P>
<P>Credit Card Type: <%= Request.Form("creditcard"
%></P>
<P>Credit Card Number: <%= Request.Form("ccnum"
%></P>
<P>Expiration Date: <%= Request.Form("expdate"
%></P>
<FORM ACTION="file:///C|/MyWebSites/INFO250/Exercise10/Tutorial.10/thankyou.htm" METHOD="post" ENCTYPE="type/plain" NAME="secpage"
onSubmit="return submitForm();"
onReset="return confirmReset();">
<INPUT TYPE="button" NAME="cancel_button" Value="Cancel">
<INPUT TYPE="button" NAME="confirm_button" Value="Confirm"></form>
</body>
</html>
I need help creating a code for the receiveorderform.asp which includes a confirm button that takes the visitor to a Thank you for ordering page and a button that cancels the order and wipes out the values enter in the form and returns them to the first page. Below is the code for the
receiveorderform.asp page
Thanks in advance!
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%
function confirmReset() {
var resetForm = confirm(
"Are you sure you want to reset the form?"
if (resetForm == true)
return true;
return false;
}
%>
</head>
<body>
<H2> Products Ordered:</H2>
<P>Hammers Ordered: <%= Request.Form("hammers"
<P>Clamps Ordered: <%= Request.Form("clamps"
<P>Torches Ordered: <%= Request.Form("torches"
<P>Axes Ordered: <%= Request.Form("axes"
<P>Name: <%= Request.Form("chisels"
<H2>Billing Information:</H2>
<P>Name: <%= Request.Form("name"
<P>Billing Address: <%= Request.Form("address"
<P>Shipping Address: <%= Request.Form("address2"
<P>City: <%= Request.Form("city"
<P>State: <%= Request.Form("state"
<P>Zip: <%= Request.Form("zip"
<P>Phone Number: <%= Request.Form("phone"
<P>Email Address: <%= Request.Form("email"
<P>Credit Card Type: <%= Request.Form("creditcard"
<P>Credit Card Number: <%= Request.Form("ccnum"
<P>Expiration Date: <%= Request.Form("expdate"
<FORM ACTION="file:///C|/MyWebSites/INFO250/Exercise10/Tutorial.10/thankyou.htm" METHOD="post" ENCTYPE="type/plain" NAME="secpage"
onSubmit="return submitForm();"
onReset="return confirmReset();">
<INPUT TYPE="button" NAME="cancel_button" Value="Cancel">
<INPUT TYPE="button" NAME="confirm_button" Value="Confirm"></form>
</body>
</html>