TrueBlue
asked on
syntax error in vbscipt
Hello.
I am getting the following error from the below listed vbscript.
Microsoft VBScript compilation error '800a03ea'
Syntax error
/ccrf.asp, line 13
& "<html>" & _
^
Any ideas?
<% If "" & Request("EmailAddress") <> "" Then
Set oMailer = Server.CreateObject("Persi ts.MailSen der")
oMailer.Host = "mail.xyz.com" 'specify valid SMTP host
oMailer.From = Request("EmailAddress") 'specify senders address
oMailer.FromName = Request("Name") 'specify senders name
oMailer.AddAddress "sales@xyz.com"
oMailer.AddCC "techserv@xyz.com"
oMailer.AddCustomHeader "Return-Receipt-To: <techserv@xyz.com>"
oMailer.AddCustomHeader "Disposition-Notification- To: <techserv@xyz.com>"
oMailer.Subject = "Automatic Credit Card Request Form"
'Build message body
strBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & _
& "<html>" & _
& "<head>" & _
& "<title>" & "Automatic Credit Card Request Form" & "</title>" & "<BR>" _
& "<meta http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">" & _
& "</head>" & _
& "<body bgcolor=""#FFFF99"">" & _
& "<h2>" & "Automatic Credit Card Request Form" & "</h2>" & _
& " <p>" & _
& "IP Address: " & Request.ServerVariables("R EMOTE_HOST ") & "<BR>" _
& "Account Number: " & Request("AccountNumber") & "<BR>" _
& "Card Type: " & Request("CardType") & "<BR>" _
& "Card Number: " & Request("CreditCardNumber" ) & "<BR>" _
& "ExpirationDate: " & Request("ExpirationDate") & "<BR>" _
& "V Code: " & Request("VCode") & "<BR>" _
& "Message: " & Request("Message") & "<BR>" _
& "</body>" & "<BR>" _
& "</html>" & "<BR>"
oMailer.Body = strBody ' assign string to Mail.Body
oMailer.IsHTML = true
On Error Resume Next
Call oMailer.Send()
Set oMailer = Nothing
Response.Redirect("thankyo u.htm")
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
Else %>
<script language="JavaScript" type="text/javascript">jav ascript: window.history.back(-1)</s cript>
<% End IF %>
I am getting the following error from the below listed vbscript.
Microsoft VBScript compilation error '800a03ea'
Syntax error
/ccrf.asp, line 13
& "<html>" & _
^
Any ideas?
<% If "" & Request("EmailAddress") <> "" Then
Set oMailer = Server.CreateObject("Persi
oMailer.Host = "mail.xyz.com" 'specify valid SMTP host
oMailer.From = Request("EmailAddress") 'specify senders address
oMailer.FromName = Request("Name") 'specify senders name
oMailer.AddAddress "sales@xyz.com"
oMailer.AddCC "techserv@xyz.com"
oMailer.AddCustomHeader "Return-Receipt-To: <techserv@xyz.com>"
oMailer.AddCustomHeader "Disposition-Notification-
oMailer.Subject = "Automatic Credit Card Request Form"
'Build message body
strBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & _
& "<html>" & _
& "<head>" & _
& "<title>" & "Automatic Credit Card Request Form" & "</title>" & "<BR>" _
& "<meta http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">" & _
& "</head>" & _
& "<body bgcolor=""#FFFF99"">" & _
& "<h2>" & "Automatic Credit Card Request Form" & "</h2>" & _
& " <p>" & _
& "IP Address: " & Request.ServerVariables("R
& "Account Number: " & Request("AccountNumber") & "<BR>" _
& "Card Type: " & Request("CardType") & "<BR>" _
& "Card Number: " & Request("CreditCardNumber"
& "ExpirationDate: " & Request("ExpirationDate") & "<BR>" _
& "V Code: " & Request("VCode") & "<BR>" _
& "Message: " & Request("Message") & "<BR>" _
& "</body>" & "<BR>" _
& "</html>" & "<BR>"
oMailer.Body = strBody ' assign string to Mail.Body
oMailer.IsHTML = true
On Error Resume Next
Call oMailer.Send()
Set oMailer = Nothing
Response.Redirect("thankyo
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
Else %>
<script language="JavaScript" type="text/javascript">jav
<% 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.
Just remove the ampersands (&) and the beginning of the line, since it is continued from the previous line and you would have two ampersands otherwise, which is not allowed.
That's what I said...