Need help with ASP script

D

Dave B.

I have a form in a password protected subweb, there are 7 text areas to fill
out. For some reason if there is anything entered in the last 2 the form
will not submit. If they are left blank the form submits and the email is
sent.
The ASP script was created with the Forms To Go program, which has worked
well for me.
I've tried deleting and recreating the text areas, tripple checked the form
field names against the ASP script, and I can't figure it out, any
suggestions?
I've tried the form in the root web with the same results.
 
T

Thomas A. Rowe

Without having access to the actual form and the code that process it, no one can help you. Have you
tried contact the author of Forms To Go ?

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================
 
D

Dave B.

I should have known better and provided that. I moved the script back to the
root web.
http://www.waterlineind.com/pm_status_report.htm

The script is pm_status_report.asp and is pasted below.


<%

'----------
' Filter Control Characters

Function filterCchar(TextToFilter)

Dim regEx

Set regEx = New RegExp

regEx.Global = true
regEx.IgnoreCase = true
regEx.Pattern ="[\x00-\x1F]"

filterCchar = regEx.Replace(TextToFilter, "")

End Function
Dim ClientIP

if Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" then
ClientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
else
ClientIP = Request.ServerVariables("REMOTE_ADDR")
end if

Dim objCDOSYSMail
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Dim objCDOSYSCnfg
Set objCDOSYSCnfg = Server.CreateObject("CDO.Configuration")

FTGsubmittedby = request.querystring("submittedby")
FTGemail = request.querystring("email")
FTGjob = request.querystring("job")
FTGdate = request.querystring("date")
FTGstartdate = request.querystring("startdate")
FTGcompletiondate = request.querystring("completiondate")
FTGscheduleissues = request.querystring("scheduleissues")
FTGpoissues = request.querystring("poissues")
FTGsubmittalissues = request.querystring("submittalissues")
FTGchangeorders = request.querystring("changeorders")
FTGengineerissues = request.querystring("engineerissues")
FTGsupplierissues = request.querystring("supplierissues")
FTGotherissues = request.querystring("otherissues")

' Redirect user to the error page

If (validationFailed = true) Then

Response.Redirect "error.htm"
Response.End

End If

' Owner Email: cdosys

objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "tngww3.tech-n-go.local"
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 60
objCDOSYSCnfg.Fields.Update

objCDOSYSMail.Configuration = objCDOSYSCnfg
emailFrom = FilterCchar(FTGemail)
emailSubject = FilterCchar("PM Status Report")
emailBodyHtml = "<body>" & vbCrLf _
& "<div align=""center"">" & vbCrLf _
& " <table border=""1"" width=""90%"" id=""table1""
bordercolorlight=""#5792C5"" cellpadding=""4"" bordercolordark=""#1A3A77"">"
& vbCrLf _
& " <tr>" & vbCrLf _
& " <td>" & vbCrLf _
& " <p align=""center""><b><font face=""Verdana"" size=""5""
color=""#1A3A77"">" & vbCrLf _
& " PM Status Report</font></b></td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " </table>" & vbCrLf _
& "</div>" & vbCrLf _
& "<p><br>" & vbCrLf _
& "&nbsp;</p>" & vbCrLf _
& "<div align=""center"">" & vbCrLf _
& " <table border=""0"" width=""90%"" id=""table2"" style=""font-family:
Verdana; font-size: 12pt; color: #1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Submitted By:</b> " & FTGsubmittedby & "</td>" & vbCrLf _
& " <td><b>Date:</b> " & FTGdate & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Job:</b> " & FTGjob & "</td>" & vbCrLf _
& " <td>&nbsp;</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Start Date:</b> " & FTGstartdate & "</td>" & vbCrLf _
& " <td><b>Completion Date:</b> " & FTGcompletiondate & "</td>" & vbCrLf
_
& " </tr>" & vbCrLf _
& " </table>" & vbCrLf _
& "</div>" & vbCrLf _
& "<br />" & vbCrLf _
& "<br />" & vbCrLf _
& "&nbsp;<table border=""0"" width=""100%"" id=""table3""
style=""font-family: Verdana; font-size: 10pt; color: #1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>scheduleissues:</b></td>" &
vbCrLf _
& " <td>" & FTGscheduleissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>poissues:</b></td>" & vbCrLf _
& " <td>" & FTGpoissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>submittalissues:</b></td>" &
vbCrLf _
& " <td>" & FTGsubmittalissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>changeorders:</b></td>" & vbCrLf
_
& " <td>" & FTGchangeorders & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>engineerissues:</b></td>" &
vbCrLf _
& " <td>" & FTGengineerissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>supplierissues:</b></td>" &
vbCrLf _
& " <td>" & FTGsupplierissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>otherissues:</b></td>" & vbCrLf _
& " <td>" & FTGotherissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& "</table>" & vbCrLf _
& "</body>" & vbCrLf _
& "</html>" & vbCrLf _
& ""

objCDOSYSMail.To = "(e-mail address removed)"
objCDOSYSMail.From = emailFrom
objCDOSYSMail.Subject = emailSubject
objCDOSYSMail.HTMLBody = emailBodyHtml
objCDOSYSMail.BodyPart.Charset = "ISO-8859-1"
objCDOSYSMail.Send

' Redirect user to success page

Response.Redirect "success.htm"


' End of ASP script
%>
 
T

Thomas A. Rowe

DaveB,

Try setting the form method to

"Post" instead of "Get"

and the following

"request.querystring" to "request.form" as shown below:

FTGsubmittedby = request.form("submittedby")
FTGemail = request.form("email")
FTGjob = request.form("job")
FTGdate = request.form("date")
FTGstartdate = request.form("startdate")
FTGcompletiondate = request.form("completiondate")
FTGscheduleissues = request.form("scheduleissues")
FTGpoissues = request.form("poissues")
FTGsubmittalissues = request.form("submittalissues")
FTGchangeorders = request.form("changeorders")
FTGengineerissues = request.form("engineerissues")
FTGsupplierissues = request.form("supplierissues")
FTGotherissues = request.form("otherissues")

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Dave B. said:
I should have known better and provided that. I moved the script back to the root web.
http://www.waterlineind.com/pm_status_report.htm

The script is pm_status_report.asp and is pasted below.


<%

'----------
' Filter Control Characters

Function filterCchar(TextToFilter)

Dim regEx

Set regEx = New RegExp

regEx.Global = true
regEx.IgnoreCase = true
regEx.Pattern ="[\x00-\x1F]"

filterCchar = regEx.Replace(TextToFilter, "")

End Function
Dim ClientIP

if Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" then
ClientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
else
ClientIP = Request.ServerVariables("REMOTE_ADDR")
end if

Dim objCDOSYSMail
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Dim objCDOSYSCnfg
Set objCDOSYSCnfg = Server.CreateObject("CDO.Configuration")

FTGsubmittedby = request.querystring("submittedby")
FTGemail = request.querystring("email")
FTGjob = request.querystring("job")
FTGdate = request.querystring("date")
FTGstartdate = request.querystring("startdate")
FTGcompletiondate = request.querystring("completiondate")
FTGscheduleissues = request.querystring("scheduleissues")
FTGpoissues = request.querystring("poissues")
FTGsubmittalissues = request.querystring("submittalissues")
FTGchangeorders = request.querystring("changeorders")
FTGengineerissues = request.querystring("engineerissues")
FTGsupplierissues = request.querystring("supplierissues")
FTGotherissues = request.querystring("otherissues")

' Redirect user to the error page

If (validationFailed = true) Then

Response.Redirect "error.htm"
Response.End

End If

' Owner Email: cdosys

objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"tngww3.tech-n-go.local"
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCnfg.Fields.Update

objCDOSYSMail.Configuration = objCDOSYSCnfg
emailFrom = FilterCchar(FTGemail)
emailSubject = FilterCchar("PM Status Report")
emailBodyHtml = "<body>" & vbCrLf _
& "<div align=""center"">" & vbCrLf _
& " <table border=""1"" width=""90%"" id=""table1"" bordercolorlight=""#5792C5"" cellpadding=""4""
bordercolordark=""#1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td>" & vbCrLf _
& " <p align=""center""><b><font face=""Verdana"" size=""5"" color=""#1A3A77"">" & vbCrLf _
& " PM Status Report</font></b></td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " </table>" & vbCrLf _
& "</div>" & vbCrLf _
& "<p><br>" & vbCrLf _
& "&nbsp;</p>" & vbCrLf _
& "<div align=""center"">" & vbCrLf _
& " <table border=""0"" width=""90%"" id=""table2"" style=""font-family: Verdana; font-size: 12pt;
color: #1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Submitted By:</b> " & FTGsubmittedby & "</td>" & vbCrLf _
& " <td><b>Date:</b> " & FTGdate & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Job:</b> " & FTGjob & "</td>" & vbCrLf _
& " <td>&nbsp;</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Start Date:</b> " & FTGstartdate & "</td>" & vbCrLf _
& " <td><b>Completion Date:</b> " & FTGcompletiondate & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " </table>" & vbCrLf _
& "</div>" & vbCrLf _
& "<br />" & vbCrLf _
& "<br />" & vbCrLf _
& "&nbsp;<table border=""0"" width=""100%"" id=""table3"" style=""font-family: Verdana; font-size:
10pt; color: #1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>scheduleissues:</b></td>" & vbCrLf _
& " <td>" & FTGscheduleissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>poissues:</b></td>" & vbCrLf _
& " <td>" & FTGpoissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>submittalissues:</b></td>" & vbCrLf _
& " <td>" & FTGsubmittalissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>changeorders:</b></td>" & vbCrLf _
& " <td>" & FTGchangeorders & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>engineerissues:</b></td>" & vbCrLf _
& " <td>" & FTGengineerissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>supplierissues:</b></td>" & vbCrLf _
& " <td>" & FTGsupplierissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>otherissues:</b></td>" & vbCrLf _
& " <td>" & FTGotherissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& "</table>" & vbCrLf _
& "</body>" & vbCrLf _
& "</html>" & vbCrLf _
& ""

objCDOSYSMail.To = "(e-mail address removed)"
objCDOSYSMail.From = emailFrom
objCDOSYSMail.Subject = emailSubject
objCDOSYSMail.HTMLBody = emailBodyHtml
objCDOSYSMail.BodyPart.Charset = "ISO-8859-1"
objCDOSYSMail.Send

' Redirect user to success page

Response.Redirect "success.htm"


' End of ASP script
%>
 
D

Dave B.

That did the trick Tom, thanks!
Rather curious though, I have 3 other forms, one with 75 fields, and didn't
have this problem with any of them.

Thomas A. Rowe said:
DaveB,

Try setting the form method to

"Post" instead of "Get"

and the following

"request.querystring" to "request.form" as shown below:

FTGsubmittedby = request.form("submittedby")
FTGemail = request.form("email")
FTGjob = request.form("job")
FTGdate = request.form("date")
FTGstartdate = request.form("startdate")
FTGcompletiondate = request.form("completiondate")
FTGscheduleissues = request.form("scheduleissues")
FTGpoissues = request.form("poissues")
FTGsubmittalissues = request.form("submittalissues")
FTGchangeorders = request.form("changeorders")
FTGengineerissues = request.form("engineerissues")
FTGsupplierissues = request.form("supplierissues")
FTGotherissues = request.form("otherissues")

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Dave B. said:
I should have known better and provided that. I moved the script back to
the root web.
http://www.waterlineind.com/pm_status_report.htm

The script is pm_status_report.asp and is pasted below.


<%

'----------
' Filter Control Characters

Function filterCchar(TextToFilter)

Dim regEx

Set regEx = New RegExp

regEx.Global = true
regEx.IgnoreCase = true
regEx.Pattern ="[\x00-\x1F]"

filterCchar = regEx.Replace(TextToFilter, "")

End Function
Dim ClientIP

if Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" then
ClientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
else
ClientIP = Request.ServerVariables("REMOTE_ADDR")
end if

Dim objCDOSYSMail
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Dim objCDOSYSCnfg
Set objCDOSYSCnfg = Server.CreateObject("CDO.Configuration")

FTGsubmittedby = request.querystring("submittedby")
FTGemail = request.querystring("email")
FTGjob = request.querystring("job")
FTGdate = request.querystring("date")
FTGstartdate = request.querystring("startdate")
FTGcompletiondate = request.querystring("completiondate")
FTGscheduleissues = request.querystring("scheduleissues")
FTGpoissues = request.querystring("poissues")
FTGsubmittalissues = request.querystring("submittalissues")
FTGchangeorders = request.querystring("changeorders")
FTGengineerissues = request.querystring("engineerissues")
FTGsupplierissues = request.querystring("supplierissues")
FTGotherissues = request.querystring("otherissues")

' Redirect user to the error page

If (validationFailed = true) Then

Response.Redirect "error.htm"
Response.End

End If

' Owner Email: cdosys

objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "tngww3.tech-n-go.local"
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2
objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 60
objCDOSYSCnfg.Fields.Update

objCDOSYSMail.Configuration = objCDOSYSCnfg
emailFrom = FilterCchar(FTGemail)
emailSubject = FilterCchar("PM Status Report")
emailBodyHtml = "<body>" & vbCrLf _
& "<div align=""center"">" & vbCrLf _
& " <table border=""1"" width=""90%"" id=""table1""
bordercolorlight=""#5792C5"" cellpadding=""4""
bordercolordark=""#1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td>" & vbCrLf _
& " <p align=""center""><b><font face=""Verdana"" size=""5""
color=""#1A3A77"">" & vbCrLf _
& " PM Status Report</font></b></td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " </table>" & vbCrLf _
& "</div>" & vbCrLf _
& "<p><br>" & vbCrLf _
& "&nbsp;</p>" & vbCrLf _
& "<div align=""center"">" & vbCrLf _
& " <table border=""0"" width=""90%"" id=""table2"" style=""font-family:
Verdana; font-size: 12pt; color: #1A3A77"">" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Submitted By:</b> " & FTGsubmittedby & "</td>" & vbCrLf _
& " <td><b>Date:</b> " & FTGdate & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Job:</b> " & FTGjob & "</td>" & vbCrLf _
& " <td>&nbsp;</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td><b>Start Date:</b> " & FTGstartdate & "</td>" & vbCrLf _
& " <td><b>Completion Date:</b> " & FTGcompletiondate & "</td>" &
vbCrLf _
& " </tr>" & vbCrLf _
& " </table>" & vbCrLf _
& "</div>" & vbCrLf _
& "<br />" & vbCrLf _
& "<br />" & vbCrLf _
& "&nbsp;<table border=""0"" width=""100%"" id=""table3""
style=""font-family: Verdana; font-size: 10pt; color: #1A3A77"">" &
vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>scheduleissues:</b></td>" &
vbCrLf _
& " <td>" & FTGscheduleissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>poissues:</b></td>" & vbCrLf _
& " <td>" & FTGpoissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>submittalissues:</b></td>" &
vbCrLf _
& " <td>" & FTGsubmittalissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>changeorders:</b></td>" &
vbCrLf _
& " <td>" & FTGchangeorders & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>engineerissues:</b></td>" &
vbCrLf _
& " <td>" & FTGengineerissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>supplierissues:</b></td>" &
vbCrLf _
& " <td>" & FTGsupplierissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& " <tr>" & vbCrLf _
& " <td align=""right"" width=""150""><b>otherissues:</b></td>" & vbCrLf
_
& " <td>" & FTGotherissues & "</td>" & vbCrLf _
& " </tr>" & vbCrLf _
& "</table>" & vbCrLf _
& "</body>" & vbCrLf _
& "</html>" & vbCrLf _
& ""

objCDOSYSMail.To = "(e-mail address removed)"
objCDOSYSMail.From = emailFrom
objCDOSYSMail.Subject = emailSubject
objCDOSYSMail.HTMLBody = emailBodyHtml
objCDOSYSMail.BodyPart.Charset = "ISO-8859-1"
objCDOSYSMail.Send

' Redirect user to success page

Response.Redirect "success.htm"


' End of ASP script
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top