HighDots Forums  

ASP Error

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss ASP Error in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
OlDirty
 
Posts: n/a

Default ASP Error - 06-10-2008 , 03:31 PM






I get this error when trying to navigate to the page. I simply copied this from
another form that works. Line 77 is actually where the "if send button was
clicked..." at the beginning of the code.

The form code is attached.

Microsoft VBScript compilation error '800a03ea'

Syntax error

/registration.asp, line 77

Else
^

<%
'*** If the SendButton was clicked
'*** and there is a message to send,
'*** process the email and send it.
Else

'*** Create the message object.
Set Message = Server.CreateObject("CDO.Message")

'*** Validate Input
nameanswer = Request.Form("name")
If nameanswer = "" then
nameanswer = "(No name given)"
End If

associationanswer = Request.Form("association")
If associationanswer = "" then
associationanswer = "(No association given)"
End If

phone1answer = Request.Form("phone1")
If phone1answer = "" then
phone1answer = "(No phone number given)"
End If

phone2answer = Request.Form("phone2")
If phone2answer = "" then
phone2answer = "(No phone number given)"
End If

addressanswer = Request.Form("address")
If addressanswer = "" then
addressanswer = "(No address given)"
End If

interestsanswer = Request.Form("interests")
If interestsanswer = "" then
interestsanswer = "(No interests given)"
End If

emailanswer = Request.Form("email")
If emailanswer <> "" then
toaddress = Request.Form("email")
bccaddress = "andrew (AT) wmsgroup (DOT) com"
End If

If emailanswer = "" then
emailanswer = "(No email address given)"
toaddress = "andrew (AT) wmsgroup (DOT) com"
bccaddress = ""
End If

timeofyearanswer = Request.Form("comments")
If timeofyearanswer = "" then
timeofyearanswer = "(No time of year given)"
End If
'*** Set the from, to, and
'*** subject fields.

Message.From = "andrew (AT) wmsgroup (DOT) com"
Message.To = toaddress
Message.bcc = bccaddress & "," & "andrew (AT) wmsgroup (DOT) com"
Message.Subject = "CertainVictory.com Speaking Engagement Registration Request"
Message.TextBody = vbcrlf & "Name: " & Now() & vbcrlf & vbcrlf & " Name: " &
nameanswer & vbcrlf & vbcrlf & "Business, Association, School, Other: " &
associationanswer & vbcrlf & vbcrlf & "Phone #1: " & phone1answer & vbcrlf &
vbcrlf & " Phone #2:" & vbcrlf & phone2answer & vbcrlf & vbcrlf & "Address:" &
vbcrlf & addressanswer & vbcrlf & vbcrlf & "Interests:" & vbcrlf &
interestsanswer & vbcrlf & vbcrlf & "Email:" & vbcrlf & emailanswer & vbcrlf &
vbcrlf & "Time of year interested in service:" & vbcrlf & timeofyearanswer

'*** If there is an error,
'*** continue with the script.
On Error Resume Next

'*** Send the email message.
Message.Send

'*** If sending the message caused
'*** an error, then display the
'*** message, else display a
'*** success message (or redirect
'*** to a different page).
If Err.Number = 0 Then
Response.Redirect("thankyou.html")
Else
Response.Write "Error: " & Err.Description
End If

'*** Clear out the message variable
Set Message = Nothing

'*** End of If for checking
'*** SendButton and message
'*** to send.
End If
%>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.