Solved

Microsoft VBScript compilation error '800a03f6',  Expected 'End'

Posted on 2003-11-12
3
1,451 Views
Last Modified: 2012-06-21
Firstly, I am not a web designer by any means.  My company has a 3rd party do the design and well apparently they don't know exactly what they are doing.  I have been fixing the designers page erroes on every *.asp page he sends, but I don't have a clue how to rectify this one:

Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/inquiry.asp, line 32


The designer added lines 10-22.  Since this addition, I get the above error.  Any suggestions?


Here is a complete copy of the coding:

<%
   Set Mail = Server.CreateObject("Persits.MailSender")
   Mail.Host = "smtp_gw.oceanelectric.net; smtp.oceanelectric.net"
   Mail.From = "test@testing-AspMail-do-not-reply.com"
   Mail.FromName = "inquiry"
   Mail.AddAddress Request("recipient")
   Mail.Subject = Request("Subject")
   Mail.Body = Request("body")

For Each Item in Request.Form
strMsgInfo = strMsgInfo & Item & ": " & Request.Form(Item) & vbCrLf
Next

strMsgHeader = "Form information follows:" & vbCrLf
strMsgHeader = strMsgHeader & "*************" & vbCrLf
strMsgFooter = "*************"


Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

If Mailer.SendMail Then
Set Mailer = Nothing

      strErr = ""
      bSuccess = False
      On Error Resume Next ' catch errors
      Mail.Send      ' send message
      If Err <> 0 Then ' error occurred
                  strErr = Err.Description
      else
                  bSuccess = True
      End If
%>

<center>
            <table width=760>
               <tr>
                  <td bgcolor=FFFFFF>
                     <table width=760 cellpadding=0 cellspacing=0>
                        <tr>
                           <td valign=top bgcolor=#282C68>
                               <table>
                                  <tr>
                                     <td colspan=2 valign=bgcolor=#282C68>
                                        <img src=images/header.jpg alt="About Ocean Electric" width="760" height="120">
                                     </td>
                                  </tr>
                                  <tr>
                                     <td valign=top width=160>
   <SCRIPT LANGUAGE = "JavaScript">
<!--
    if (document.images) {
//
    img000over = new Image();
    img000over.src = "mo/nav-on000.gif";
    img001over = new Image();
    img001over.src = "mo/nav-on001.gif";
    img002over = new Image();
    img002over.src = "mo/nav-on002.gif";
    img003over = new Image();
    img003over.src = "mo/nav-on005.gif";
    img004over = new Image();
    img004over.src = "mo/nav-on003.gif";
    img005over = new Image();
    img005over.src = "mo/nav-on004.gif";
//
    img000out = new Image();
    img000out.src = "mo/nav-off000.gif";
    img001out = new Image();
    img001out.src = "mo/nav-off001.gif";
    img002out = new Image();
    img002out.src = "mo/nav-off002.gif";
    img003out = new Image();
    img003out.src = "mo/nav-off005.gif";
    img004out = new Image();
    img004out.src = "mo/nav-off003.gif";
    img005out = new Image();
    img005out.src = "mo/nav-off004.gif";
}

// Function to show active images.
function imgOver(imgName) {
    if (document.images) {
        document[imgName].src = eval(imgName + "over.src");
    }
}

// Function to show inactive images.
function imgOut(imgName) {
    if (document.images) {
        document[imgName].src = eval(imgName + "out.src");
    }
}

// -->
</SCRIPT>

<img src=images/house-left.jpg width="160" height="128">
<br>
<TABLE CELLSPACING = 0 CELLPADDING = 0 BORDER = 0>
<!-- Table starts with a dummy row to force correct cell widths -->
<!-- Each row starts with a dummy to force correct cell heights -->
<TR><TD WIDTH = 0 HEIGHT = 0></TD><TD WIDTH = 180 HEIGHT = 0></TD></TR><TR><TD WIDTH = 0 HEIGHT = 31></TD><TD><A HREF = "about.html" onMouseOver = "imgOver('img000')" onMouseOut = "imgOut('img000')"><IMG
NAME = "img000" SRC = "mo/nav-off000.gif" BORDER = 0 width="180" height="31"></A></TD></TR><TR><TD WIDTH = 0 HEIGHT = 29></TD><TD><A HREF = "securenet.html" target=_blank onMouseOver = "imgOver('img001')" onMouseOut = "imgOut('img001')"><IMG
NAME = "img001" SRC = "mo/nav-off001.gif" BORDER = 0 width="180" height="29"></A></TD></TR><TR><TD WIDTH = 0 HEIGHT = 29></TD><TD><A HREF = "http://www.garagetek.com" target=_blank onMouseOver = "imgOver('img003')" onMouseOut = "imgOut('img003')"><IMG
NAME = "img003" SRC = "mo/nav-off005.gif" BORDER = 0 WIDTH = 180 HEIGHT = 29></A></TD></TR><TR><TD WIDTH = 0 HEIGHT = 31></TD><TD><a HREF="http://www.oceanelectric.net/contact.html" onMouseOver="imgOver('img004')" onMouseOut="imgOut('img004')"><IMG
NAME = "img004" SRC = "mo/nav-off003.gif" BORDER = 0 width="180" height="31"></a></TD></TR><TR><TD WIDTH = 0 HEIGHT = 33></TD><TD><A HREF = "index.html" onMouseOver = "imgOver('img005')" onMouseOut = "imgOut('img005')"><IMG
NAME = "img005" SRC = "mo/nav-off004.gif" BORDER = 0 width="180" height="33"></A></TD></TR></TABLE>
                                 </td>
                                 <td valign=top bgcolor=#FFFFFF>
                                    <font face=arial,helvetica size=-1>
                                       <blockquote>
                                       <br>
                                       <b>Thank you for your inquiry! An Ocean Electric sales representative will contact you shortly.
                                       </blockquote>

                              <center>

                                    <img src=images/logo-sm.gif width="137" height="44">
                                       <font size=-2 face=arial,helvetica>
                                          <br>
                                             99 Mariner Drive<br>
                                             Southampton, NY 11968<br>
                                             Phone: (631) 287-6060 Fax: (631) 287-0731
                                          <br>
                                          <br>
                                       </font>
                                 </td>
                              </tr>
                           </table>
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
0
Comment
Question by:tldrio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Hilaire earned 500 total points
ID: 9730860
Lacking "End If" statement just before the first "%>"

<%
   Set Mail = Server.CreateObject("Persits.MailSender")
   Mail.Host = "smtp_gw.oceanelectric.net; smtp.oceanelectric.net"
   Mail.From = "test@testing-AspMail-do-not-reply.com"
   Mail.FromName = "inquiry"
   Mail.AddAddress Request("recipient")
   Mail.Subject = Request("Subject")
   Mail.Body = Request("body")

For Each Item in Request.Form
strMsgInfo = strMsgInfo & Item & ": " & Request.Form(Item) & vbCrLf
Next

strMsgHeader = "Form information follows:" & vbCrLf
strMsgHeader = strMsgHeader & "*************" & vbCrLf
strMsgFooter = "*************"


Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

If Mailer.SendMail Then
Set Mailer = Nothing

     strErr = ""
     bSuccess = False
     On Error Resume Next ' catch errors
     Mail.Send     ' send message
     If Err <> 0 Then ' error occurred
               strErr = Err.Description
     else
               bSuccess = True
     End If
End If
%>


HTH

Hilaire
0
 
LVL 26

Expert Comment

by:Hilaire
ID: 9731051
Hi, there are a few things that sound odd in the code you posted.

You'll find working examples using this free email-sending component at this URL
http://www.aspemail.com/manual_02.html

You'll also find links to download the last version of this free component
http://www.aspemail.com/download.html

The last versions come with a setup exe so you don't even have to register it manually.

<%
   Dim strMsgBody
   Set Mail = Server.CreateObject("Persits.MailSender")
   Mail.Host = "smtp_gw.oceanelectric.net; smtp.oceanelectric.net"
   Mail.From = "test@testing-AspMail-do-not-reply.com"
   Mail.FromName = "inquiry"
   Mail.AddAddress Request("recipient")
   Mail.Subject = Request("Subject")
   strMsgBody = "Form information follows:" & vbCrLf & "*************" & vbCrLf
   'Build Msg Body
   For Each Item in Request.Form
      strMsgBody = strMsgBody & Item.Name & ": " & Request.Form(Item).value & vbCrLf
   Next
   strMsgBody = strMsgBody & "*************"

   Mail.Body = strMsgBody
   strErr = ""
   bSuccess = False
   On Error Resume Next ' catch errors
   Mail.Send     ' send message
   If Err <> 0 Then ' error occurred
             strErr = Err.Description
   else
             bSuccess = True
   End If
   set Mail = Nothing
%>

The code above is a revised version of yours.
- mailer object not used any more
- consistent variable names

Hilaire


0
 

Author Comment

by:tldrio
ID: 9731089
Thank you.  That solved that error.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question