PDA

View Full Version : sending a multiline textbox to ASP


designmx
03-31-2004, 12:13 AM
First my issue... I have 4 input text boxes... 3 single line.. the 4th being a comment box is multiline.each with their own variable name (name, email, website, comments)

my issue is with the comment box. if someone is typing a long comment.. and presses ENTER for a new line or paragraph the comment is cut off at that point and that is all i receive in the e-mail that the ASP script below sends...

<%
For Each x In Request.Form
message=message & x & ": " & Request.Form(x) & CHR(10)
Next

set smtp = Server.CreateObject("Bamboo.SMTP")
' You only need to change the smtp.Rcpt ans smpt.from part to your email address
smtp.Server = "mail.hostname.com"
smtp.Rcpt = "mymail@myhost.com"
smtp.From = "webform@whatever.com"
smtp.FromName = Request.ServerVariables("HTTP_REFERER")
smtp.Subject = "Your web form - " & Request.ServerVariables("HTTP_REFERER")
smtp.Message = message
on error resume next
smtp.Send
end if
set smtp = Nothing
%>



my form submit button has the following action script

on (release) {
if (name == "") {
info = "Please enter your Name";
} else if (email == "") {
info = "Please enter an email address";
} else if (email.indexOf(".",0)==-1 || email.indexOf("@",0)==-1) {
info = "Please enter a valid email address";
} else if (comments == "") {
info = "Comment box is empty";
} else {
loadVariablesNum("form.asp", 1, "POST");
gotoAndPlay("sent");
}
}



Anyone? why when a user presses enter does the message get cut off?
thanks in advance.