I am beginning to move from cgi form to asp for my "contact me" page.
<!--begin sarcasm ha ha end sarcasm ha -->
I have managed to make a really simple contact me page that allows me to collect name, email and message. That works just fine.
I thought that I could venture in asking an additional "or" question (are you age 12 and under or are you age 13 and over). I set it tup in the contact.htm page and proceeded to copy whatever was in the .asp and apply it to my added "age" field. I am stumped.
The age radio buttton is called "age" in contact.htm.
here is the code i used on the asp form (SendMail2.asp)
<%@LANGUAGE = VBSCRIPT%> <HTML>
<SCRIPT language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'"
}
//-->
</SCRIPT>
<BODY onLoad="MM_goToURL('parent','../thanx.htm');return document.MM_returnValue">
<%
' Get the form data
name = Request.Form("name"
senderEmail = Request.Form("email"
subject = Request.Form("subject"
recipient = "contact@macomoodus.com"
body = Request.Form("body"
age = Request.Form("age"
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' Enter the sender data
msg.From = senderEmail
msg.FromName = name
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient recipient
' The subject of the message
msg.Subject = subject
' And the body
msg.body = body
' And the age
msg.body = age
' Now send the message, using the indicated mailserver
if not msg.Send("mail.macomoodus.com" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Thank you for contacting Mac O' Moodus!"
end if
' And we're done! the message has been sent.
%>
</BODY>
</HTML>
Thanks for your attention!
<!--begin sarcasm ha ha end sarcasm ha -->
I have managed to make a really simple contact me page that allows me to collect name, email and message. That works just fine.
I thought that I could venture in asking an additional "or" question (are you age 12 and under or are you age 13 and over). I set it tup in the contact.htm page and proceeded to copy whatever was in the .asp and apply it to my added "age" field. I am stumped.
The age radio buttton is called "age" in contact.htm.
here is the code i used on the asp form (SendMail2.asp)
<%@LANGUAGE = VBSCRIPT%> <HTML>
<SCRIPT language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'"
}
//-->
</SCRIPT>
<BODY onLoad="MM_goToURL('parent','../thanx.htm');return document.MM_returnValue">
<%
' Get the form data
name = Request.Form("name"
senderEmail = Request.Form("email"
subject = Request.Form("subject"
recipient = "contact@macomoodus.com"
body = Request.Form("body"
age = Request.Form("age"
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' Enter the sender data
msg.From = senderEmail
msg.FromName = name
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient recipient
' The subject of the message
msg.Subject = subject
' And the body
msg.body = body
' And the age
msg.body = age
' Now send the message, using the indicated mailserver
if not msg.Send("mail.macomoodus.com" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Thank you for contacting Mac O' Moodus!"
end if
' And we're done! the message has been sent.
%>
</BODY>
</HTML>
Thanks for your attention!