Can't get correct redirect page

Results 1 to 2 of 2

Thread: Can't get correct redirect page

  1. #1
    Join Date
    Dec 1969

    Default Can't get correct redirect page

    The form works, that is, the form is sent to the email, but the page "page not found" comes up. Can someone help? The form is at: <BR> <BR><BR>and the asp for it is: <BR><BR>&#060;%@ Language=VBScript %&#062; <BR>&#060;% Option Explicit %&#062; <BR>&#060;html&#062; <BR>&#060;head&#062; <BR>&#060;title&#062;Thank you&#060;/title&#062; <BR>&#060;/head&#062; <BR>&#060;body bgcolor="#000000" text="#FFFFFF"&#062; <BR>&#060;div align="center"&#062;Thank you!&#060;/div&#062; <BR><BR><BR>&#060;% <BR> &#039;The header/footer for the email. <BR> Const strHeader = "Here are the results of the form:" <BR> Const strFooter = "Form mailer created by, 1999" <BR><BR> &#039;Who does this go to? MAKE SURE TO CHANGE THIS TO YOUR EMAIL ADDRESS! <BR> Const strTo = "" <BR><BR> &#039;This information is optional <BR> Dim strFrom, strSubject, strRedirectURL, strFromPath <BR><BR> strFrom = Request.Form("txtSendToEmailAddress") <BR> if Len(strFrom) = 0 then strFrom = strTo <BR><BR> strSubject = Request.Form("txtEmailSubject") <BR> if Len(strSubject) = 0 then strSubject = "FORM EMAILER:" <BR><BR> strRedirectURL = Request.Form("urlSendTo") <BR> if Len(strRedirectURL) = 0 then strRedirectURL = "" <BR><BR> strFromPath = Request.Form("urlFromPath") <BR> if Len(strFromPath) = 0 then strFromPath = "UNKNOWN" <BR><BR> Dim strBody <BR> strBody = strHeader & ( vbCrLf & vbCrLf ) <BR> strBody = strBody & ( "FORM: " & strFromPath & vbCrLf ) & _ <BR> ( "FORM submitted at " & Now() & vbCrLf & vbCrLf ) <BR><BR> dim ix, formElementName, formElementValue, prefix, fldName <BR> For ix = 1 to Request.Form.Count <BR> formElementName = Request.Form.Key(ix) <BR> formElementValue = Request.Form.Item(ix) <BR><BR> &#039; what type of field was that on the form? <BR> prefix = Left(formElementName,3) <BR> <BR> &#039; and throw away prefix to get actual field name <BR> fldName = Mid(formElementName,4) <BR> <BR> &#039; but change periods to spaces for readability <BR> fldName = Replace(fldName, "."," ") <BR><BR> Select Case prefix <BR> &#039; if the prefix indicates this is a form field of interest... <BR> Case "txt","sel","rad","cbo","lst","chk": <BR> &#039; if user didn&#039;t answer this question, say so... <BR> if Len(formElementValue) = 0 then formElementValue = "UNANSWERED" <BR> <BR> &#039; then tack on the name of the field and the answer <BR> strBody = strBody & (fldName & ": " & formElementValue & vbCrLf) <BR> End Select <BR> Next <BR> <BR> strBody = strBody & ( vbCrLf & strFooter ) <BR><BR> &#039;Time to send the email <BR> Dim objCDO <BR> Set objCDO = Server.CreateObject("CDONTS.NewMail") <BR> objCDO.To = strTo <BR> objCDO.From = strFrom <BR><BR> objCDO.Subject = strSubject <BR> objCDO.Body = strBody <BR><BR> objCDO.Send <BR><BR> Set objCDO = Nothing <BR><BR> &#039;Send them to the page specified <BR> Response.Redirect strRedirectURL <BR>%&#062; <BR>&#060;/body&#062; <BR>&#060;/html&#062; <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Can't get correct redirect page

    It looks like your form redirect value is incorrect. In your form you pass this:<BR><BR>&#060;INPUT TYPE=HIDDEN NAME="urlSendTo" VALUE="/thankyou.htm"&#062;<BR><BR>"/thankyou.htm" doesn&#039;t exist, but "thankyou.htm" does :)<BR><BR>HTH HAND<BR><BR>Jus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts