I always get the "The page cannot be displayed" error when I submit from my form.
This is my form code:
<%@ LANGUAGE="VBSCRIPT" %>
<!--- This example illustrates the use of a "thank you" note after submitting a form --->
<HTML>
<HEAD>
<TITLE>Papa Rock Guestbook</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
color: #FFFF00;
}
body {
background-color: #000000;
}
-->
</style></HEAD>
<BODY>
<h1>Papa Rock's Guestbook</h1>
<BR>
<hr>
Please fill out the information below. This information will keep us informed about the people that have visited the site and will also help us compile a mailing list to send out our newsletter when it is available.
<P>
<FORM ACTION="aspty.asp" NAME="form" METHOD="post">
Name:
<INPUT TYPE="text" SIZE=30 NAME="yourname">
<P>
Email Address: <INPUT TYPE="text" SIZE=30 NAME="email">
<P>Have you ever seen Papa Rock perform live?
<INPUT TYPE="radio" NAME="seenlive" VALUE="yes" CHECKED>
Yes
<INPUT TYPE="radio" NAME="seenlive" VALUE="no">No
<P>
Are you interested in receiving Papa Rock's newsletter when it becomes available?
<INPUT TYPE="radio" NAME="nletter" VALUE="yes" CHECKED> Yes
<INPUT TYPE="radio" NAME="nletter" VALUE="no">No
<P>Comments :
<P>
<textarea name="email" cols="60" rows="5">Enter Comments Here...</textarea>
<P>
<INPUT name="Submit" TYPE="submit" VALUE="Submit">
<INPUT name="Reset" TYPE="reset" VALUE="Reset Form">
</FORM>
</BODY>
</HTML>
And THIS is my reponse page code:
<%@ LANGUAGE="VBSCRIPT" %>
<!--- This example illustrates the use of a "thank you" note after submitting a form --->
<HTML>
<HEAD>
<TITLE>ASP Guestbook Thank You</TITLE>
</HEAD>
<BODY>
Thanks for signing our guestbook, <% =Request.Form(yourname) %>.
<!-- The following area delineates and sends mail -->
<P>
<%
' Set up variables to hold the text strings
Dim DestinationEmail
Dim OriginatingEmail
Dim Subject
Dim Body
' assign text to the variable
OriginatingEmail = Request.form("email")
DestinationEmail = "dpgrieve@charter.net"
Subject = "Guestbook Reply"
' The body contains all the form data separated by semicolons
Body = "Name = " & Request.form("yourname") & "; Email Address = " & Request.form("email") & "; Seen Live = " & Request.form("seenlive"); & "News Letter = " & Request.form("nletter")
' Send email via the SendMail utility...note that this is an add-on to Active Server Pages and needs to be installed separatelly on the server.
Set email = Server.CreateObject("MPS.SendMail")
retCode = email.SendMail(OriginatingEmail, DestinationEmail, Subject, Body)
' Posts if mail has been sent or not
IF NOT True = retCode THEN
Response.write("Failed to send results to "&DestinationEmail&" due to "&Err.Description&".<P>")
ELSE
Response.write("Your information has been sent.<P>")
END IF
' Posts answer depending on radio button choice
IF Request.form("seenlive") = "yes" THEN
Response.write("Hope you liked us when you saw us. Please come see us again...")
ELSE
Response.write("You should come see us live at the Daiquiri Depot in Covington, Louisiana on Sundays.")
END IF
%>
</BODY>
</HTML>