PDA

View Full Version : Confirmation Page



mac_guy
06-08-2007, 11:02 PM
Here's what I am trying to do: Have a list of items for customers to create a list have the script take them to a confirmation page of sorts, where it simply lists the items they have checked, and then they can print it and be on their way. I tried to use a POST method, going from an HTML page to an ASP page in dreamweaver, following a tutorial I found here: http://dreamweaverfever.com/tutorials/ultradev/insert-confirm.asp

Here's my script from the confirm.asp page:

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<p><%= Request.Form("OrnamentOne") %></p>
<p><%= Request.Form("OrnamentTwo") %></p>
<p><%= Request.Form("OrnamentThree") %></p>
</body>
</html>

and now my code from the gift.html page (form only):

<form id="form1" name="form1" method="post" action="confirm.asp">
<label></label>
<fieldset><legend></legend>
<label>
<input name="checkbox" type="checkbox" value="OranamentOne" />
one</label>
<br />
<label>
<input name="checkbox2" type="checkbox" value="OranamentTwo" />
two </label>
<br />
<label>
<input name="checkbox3" type="checkbox" value="OranamentThree" />
three<br />
</label>
<input type="submit" name="Submit" value="Submit" /></fieldset>
</form>

Hopefully I'm posting in the correct forum. Thanks!

mac_guy
06-08-2007, 11:19 PM
My gift.html page actually reads this: (sorry for the previously misspellings; tried to correct it, but it wouldn't let me edit)

<form id="form1" name="form1" method="post" action="confirm.asp">
<label></label>
<fieldset><legend></legend>
<label>
<input name="checkbox" type="checkbox" value="OrnamentOne" />
one</label>
<br />
<label>
<input name="checkbox2" type="checkbox" value="OrnamentTwo" />
two </label>
<br />
<label>
<input name="checkbox3" type="checkbox" value="OrnamentThree" />
three<br />
</label>
<input type="submit" name="Submit" value="Submit" /></fieldset>
</form>

mehere
06-09-2007, 02:25 AM
you're using the wrong name in your request.Form statements. you're using the values instead of the checkbox name

<body>
<p><%= Request.Form("OrnamentOne") %></p>
<p><%= Request.Form("OrnamentTwo") %></p>
<p><%= Request.Form("OrnamentThree") %></p>
</body>
should be
<body>
<p><%= Request.Form("checkbox") %></p>
<p><%= Request.Form("checkbox2") %></p>
<p><%= Request.Form("checkbox3") %></p>
</body>[/code]

mac_guy
06-09-2007, 02:40 AM
Ok. Thanks, I've updated the code. I'm still getting a 405 Method Not Allowed Error, "The requested method POST is not allowed for the URL /confirm.asp." so I'm not sure what else I'm missing in my code.

glenngv
06-09-2007, 04:54 AM
Your ISP must have disabled POST request. Verify this with your host.

mac_guy
06-10-2007, 08:40 AM
Thank you for your feedback, the issue has been resolved, as I can't run ASP scripts on my server, so I've fixed the problem with PHP.

Thanks for your wealth of information. It's much appreciated.