akbiro
asked on
.asp form
I am working on a simple form for my son's wedding rsvp. The page is www.birowedding.com/yespage.html.
When you click the submit button it goes to the .asp page instead of executing that page. I think I missed something in my the code. can someone take a look and let me know? THANKS
When you click the submit button it goes to the .asp page instead of executing that page. I think I missed something in my the code. can someone take a look and let me know? THANKS
looking at the code briefly, the form is posting it's data to contactusprocess.asp. Is it supposed to go somewhere else?
You have asp code in an HTML page - unless you have added HTML mapping to the server to be processed by the ASP engine it will just spew it out to the browser
Change the extension to .asp
yespage.asp
Change the extension to .asp
yespage.asp
Your frame is a bit wrong <frame src="http://www.loadup2us.com/tswedding//yespage.html" frameborder="0" />
Just one slash
<frame src="http://www.loadup2us.com/tswedding/yespage.html" frameborder="0" />
However, you have to turn classic asp on. Are you on a windows server?
http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis
Just one slash
<frame src="http://www.loadup2us.com/tswedding/yespage.html" frameborder="0" />
However, you have to turn classic asp on. Are you on a windows server?
http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis
You're on Bluehost with an Apache web server that will not run ASP code. Either change to a Windows server or change your processing page.
And why frames in frames? There is nothing there that will benefit from the use of frames.
And why frames in frames? There is nothing there that will benefit from the use of frames.
ASKER
Ok...I moved it to a different server. Take a look from this link please and tell me why I can not process the form. Thanks
http://www.xtremeaquaticfoods.com/tswedding/yespage.asp
http://www.xtremeaquaticfoods.com/tswedding/yespage.asp
It's falling in line 31, can you posteoporosis that line of code? Almost looks like a permissions issue
When I click on the file name "contactusprocess.asp" , I get this in response:
<font face="Arial" size=2>
<p>Server object</font> <font face="Arial" size=2>error 'ASP 0177 : 800401f3'</font>
<p>
<font face="Arial" size=2>Server.CreateObject Failed</font>
<p>
<font face="Arial" size=2>/tswedding/contactusprocess.asp</font><font face="Arial" size=2>, line 31</font>
<p>
<font face="Arial" size=2>800401f3
</font>
At least now it is on a Microsoft IIS server where it can run. There is just something wrong in the code.
You're on a newer version of IIS which doesn't have CDONTS, instead you use CDO.SYS
Just a minor change from what you already have, example here
http://www.w3schools.com/asp/asp_send_email.asp
p.s.
nice catch by Dave!
Just a minor change from what you already have, example here
http://www.w3schools.com/asp/asp_send_email.asp
p.s.
nice catch by Dave!
posteoporosis ???
ASKER
I changes it to CDO.SYS no joy
Meant to say post, damn auto correct :)
Is line 31 a reference to the cdo object?
Is line 31 a reference to the cdo object?
ASKER
I have no clue. Sorry...I am just a beginner
Can you post like 31 then?
ASKER
Sorry, not sure what you are asking me to do. Is there a correction for line 31. Can you tell me what is should be? THANKS
ASKER
Here is the code starting from line 31
Set objNewMail = Server.CreateObject("CDO.S YS.NewMail ")
objNewMail.From = Request("Email Address")
objNewMail.Subject = "RSVP BiroWedding.com"
objNewMail.To = mail_to
objNewMail.Body = emsg & fline
objNewMail.Send
Set objNewMail = Nothing
Set objNewMail = Server.CreateObject("CDO.S
objNewMail.From = Request("Email Address")
objNewMail.Subject = "RSVP BiroWedding.com"
objNewMail.To = mail_to
objNewMail.Body = emsg & fline
objNewMail.Send
Set objNewMail = Nothing
Set objNewMail = Server.CreateObject("CDO.Message")
change
Set objNewMail = Server.CreateObject("CDO.S YS.NewMail ")
to
Set objNewMail = Server.CreateObject("CDO.M essage")
Set objNewMail = Server.CreateObject("CDO.S
to
Set objNewMail = Server.CreateObject("CDO.M
ASKER
Making progress?
Here is the new error message:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'objNewMail.Body'
/tswedding/contactusproces s.asp, line 35
Here is the new error message:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'objNewMail.Body'
/tswedding/contactusproces
Change it to
ObjNewMail.TextBody
. Our if you're sending out an html formatted email
ObjNewMail.HTMLBody
ObjNewMail.TextBody
. Our if you're sending out an html formatted email
ObjNewMail.HTMLBody
Follow the link I gave exactly
ASKER
This is what I have and it still fails.
Set objNewMail = Server.CreateObject("CDO.M essage")
Set objNewMail = Server.CreateObject("CDO.M
change your code to:
Set objNewMail = Server.CreateObject("CDO.S YS.NewMail ")
objNewMail.From = Request("Email Address")
objNewMail.Subject = "RSVP BiroWedding.com"
objNewMail.To = mail_to
objNewMail.TextBody = emsg & fline '-- for a text based email, otherwise use objNewMail.HTMLBody = emsg&fline
objNewMail.Send
Set objNewMail = Nothing
Set objNewMail = Server.CreateObject("CDO.S
objNewMail.From = Request("Email Address")
objNewMail.Subject = "RSVP BiroWedding.com"
objNewMail.To = mail_to
objNewMail.TextBody = emsg & fline '-- for a text based email, otherwise use objNewMail.HTMLBody = emsg&fline
objNewMail.Send
Set objNewMail = Nothing
ASKER
I feel like an idiot...am I doing what you are suggesting...it still fails. Thanks for your patience.
Post all your code as you have it now.
ASKER
<%
'''''''''''''''''''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' ''''
' Freeware from Seiretto.com
' available at http://asp.thedemosite.co.uk
'
' DON'T forget to change the mail_to email address below!!!
' and thats all you need to change.
'''''''''''''''''''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' '''''''''' ''''
Dim error
error = 0
For Each f In Request.Form
If Request.Form(f) = "" Then
error = 1
End If
Next
If error=1 Then
response.redirect "error.html"
Else
Dim f, emsg, mail_to, r, o, c, other
mail_to = "akbiro@aol.com"
fline = "_________________________ __________ __________ __________ __________ ______"& vbNewLine
hline = vbNewLine & "_________________________ __________ __"& vbNewLine
emsg = ""
For Each f In Request.Form
If mid(f,1,1)<>"S" = True Then 'do not save if input name starts with S
emsg = emsg & f & " = " & Trim(Request.Form(f)) & hline
End If
Next
Set objNewMail = Server.CreateObject("CDO.S YS.NewMail ")
objNewMail.From = Request("Email Address")
objNewMail.Subject = "RSVP BiroWedding.com"
objNewMail.To = mail_to
objNewMail.TextBody = emsg & fline '-- for a text based email, otherwise use objNewMail.HTMLBody = emsg&fline
objNewMail.Send
Set objNewMail = Nothing
response.redirect "thankyou.html"
End if
%>
''''''''''''''''''''''''''
' Freeware from Seiretto.com
' available at http://asp.thedemosite.co.uk
'
' DON'T forget to change the mail_to email address below!!!
' and thats all you need to change.
''''''''''''''''''''''''''
Dim error
error = 0
For Each f In Request.Form
If Request.Form(f) = "" Then
error = 1
End If
Next
If error=1 Then
response.redirect "error.html"
Else
Dim f, emsg, mail_to, r, o, c, other
mail_to = "akbiro@aol.com"
fline = "_________________________
hline = vbNewLine & "_________________________
emsg = ""
For Each f In Request.Form
If mid(f,1,1)<>"S" = True Then 'do not save if input name starts with S
emsg = emsg & f & " = " & Trim(Request.Form(f)) & hline
End If
Next
Set objNewMail = Server.CreateObject("CDO.S
objNewMail.From = Request("Email Address")
objNewMail.Subject = "RSVP BiroWedding.com"
objNewMail.To = mail_to
objNewMail.TextBody = emsg & fline '-- for a text based email, otherwise use objNewMail.HTMLBody = emsg&fline
objNewMail.Send
Set objNewMail = Nothing
response.redirect "thankyou.html"
End if
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Change
Set objNewMail = Server.CreateObject("CDO.S YS.NewMail ")
To
Set objNewMail = Server.CreateObject("CDO.M essage")
Set objNewMail = Server.CreateObject("CDO.S
To
Set objNewMail = Server.CreateObject("CDO.M
ASKER
Thank you for your patience. It works PERFECTLY...THanks and thanks again