Solved

Microsoft JScript compilation (0x800A03EC) Expected ';'

Posted on 2003-12-05
17
2,586 Views
Last Modified: 2012-06-27
Hi guys,
im getting this error message
Microsoft JScript compilation (0x800A03EC)
Expected ';'
submit.asp, line 70, column 3

here is my code, anyone any ideas how to fix? line 70 is the first line.

<%

 If request.form("NAME")="" then
Response.Write "<table width=""448"" border=""0"" cellspacing=""0"" cellpadding=""0"" background=""../images/c_icbox.gif"" height=""365"" align=""center"">"
Response.Write "  <tr> "
Response.Write "    <td>"
Response.Write "      <div align=""center""><img src=""images/c_ic_deny.gif""><br>"
Response.Write "        <font face='verdana' size=2><b>!!! ERROR !!!</b><br>"
Response.Write "        <b>Please Go Back & Check That You Have Filled In <br>"
Response.Write "        All The Required Feilds</b></font><br>"
Response.Write "        <a href=""Javascript:history.back();""><<< Back</a></div>"
Response.Write "    </td>"
Response.Write "  </tr>"
Response.Write "</table>"
Response.Write ""

else

    for i=1 to request.form.count
   Message = Message & request.form.key(i) & " : " & request.form.item(i) & vbCrLf
    Next
      
    Set objMail = CreateObject("CDONTS.Newmail")
    objMail.From = request.form("Email")
    objMail.To = "myemail@mydomain.com"
    objMail.Subject = "- My Form - "
    objMail.Body = Message
    objMail.Send
    Set objMail = Nothing

      Response.Redirect("itWorked.asp")

End If
%>  
0
Comment
Question by:jay_eire
[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
  • 12
  • 5
17 Comments
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882249
It sounds like the default server side scripting language on your server is Jscript.  Try changing that in IIS or put this at the top of your page.

<%@ Language=VBScript %>
0
 
LVL 7

Author Comment

by:jay_eire
ID: 9882319
thanks for that but im using JScript else where on the page in menu etc,,,

do i have to add in ; to the end of the lines?
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882372
You have to convert the code above the jscript.  It currently is in VBScript.  It's more than just ; at the end.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 7

Author Comment

by:jay_eire
ID: 9882408
Do you have any pointers on what has to change?
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882426
Try this
if(Request.Form("NAME")==""){
      Response.Write("<table width=""448"" border=""0"" cellspacing=""0"" cellpadding=""0"" background=""../images/c_icbox.gif"" height=""365"" align=""center"">");
      Response.Write("  <tr> ");
      Response.Write("    <td>");
      Response.Write("      <div align=""center""><img src=""images/c_ic_deny.gif""><br>");
      Response.Write("        <font face='verdana' size=2><b>!!! ERROR !!!</b><br>");
      Response.Write("        <b>Please Go Back & Check That You Have Filled In <br>");
      Response.Write("        All The Required Feilds</b></font><br>");
      Response.Write("        <a href=""Javascript:history.back();""><<< Back</a></div>");
      Response.Write("    </td>");
      Response.Write("  </tr>");
      Response.Write("</table>");
      Response.Write("");
}
else {
    var Message, Key;
    for (Key in Request.Form) {
            Message += Key + " : " & request.Form.Item(Key) & vbCrLf;
    }
     
    var objMail = Server.CreateObject("CDONTS.Newmail");
    objMail.From = request.form("Email");
    objMail.To = "myemail@mydomain.com";
    objMail.Subject = "- My Form - ";
    objMail.Body = Message;
    objMail.Send;
    Response.Redirect("itWorked.asp");
}
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882430
on small change

if(Request.Form("NAME")==""){
     Response.Write("<table width=""448"" border=""0"" cellspacing=""0"" cellpadding=""0"" background=""../images/c_icbox.gif"" height=""365"" align=""center"">");
     Response.Write("  <tr> ");
     Response.Write("    <td>");
     Response.Write("      <div align=""center""><img src=""images/c_ic_deny.gif""><br>");
     Response.Write("        <font face='verdana' size=2><b>!!! ERROR !!!</b><br>");
     Response.Write("        <b>Please Go Back & Check That You Have Filled In <br>");
     Response.Write("        All The Required Feilds</b></font><br>");
     Response.Write("        <a href=""Javascript:history.back();""><<< Back</a></div>");
     Response.Write("    </td>");
     Response.Write("  </tr>");
     Response.Write("</table>");
     Response.Write("");
}
else {
    var Message, Key;
    for (Key in Request.Form) {
          Message += Key + " : " & request.Form.Item(Key) + vbCrLf;
    }
     
    var objMail = Server.CreateObject("CDONTS.Newmail");
    objMail.From = request.form("Email");
    objMail.To = "myemail@mydomain.com";
    objMail.Subject = "- My Form - ";
    objMail.Body = Message;
    objMail.Send;
    Response.Redirect("itWorked.asp");
}
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882436
Sorry there's still a small change again.....replace & for concatenation with +
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882438
I'm not sure if vbcrlf will work in jscript.  I will take a look
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882484
This should do it.

if(Request.Form("NAME")==""){
      Response.Write("<table width=""448"" border=""0"" cellspacing=""0"" cellpadding=""0"" background=""../images/c_icbox.gif"" height=""365"" align=""center"">");
      Response.Write("  <tr> ");
      Response.Write("    <td>");
      Response.Write("      <div align=""center""><img src=""images/c_ic_deny.gif""><br>");
      Response.Write("        <font face='verdana' size=2><b>!!! ERROR !!!</b><br>");
      Response.Write("        <b>Please Go Back & Check That You Have Filled In <br>");
      Response.Write("        All The Required Feilds</b></font><br>");
      Response.Write("        <a href=""Javascript:history.back();""><<< Back</a></div>");
      Response.Write("    </td>");
      Response.Write("  </tr>");
      Response.Write("</table>");
      Response.Write("");
}
else {
    var Message, Key;
    for (Key in Request.Form) {
      Message += Key + " : " + request.Form.Item(Key) + String.fromCharCode(13,10);
    }
     
    var objMail = Server.CreateObject("CDONTS.Newmail");
    objMail.From = request.form("Email");
    objMail.To = "myemail@mydomain.com";
    objMail.Subject = "- My Form - ";
    objMail.Body = Message;
    objMail.Send;
    Response.Redirect("itWorked.asp");
}
0
 
LVL 7

Author Comment

by:jay_eire
ID: 9882515
thank you for your help on this....

but it has an error message

Error Type:
Microsoft JScript compilation (0x800A03EE)
Expected ')'


line 69, column 30

which is

Response.Write("<table width=""448"" border=""0"" cellspacing=""0"" cellpadding=""0"" background=""../images/c_icbox.gif"" height=""365"" align=""center"">");
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882537
I just tested this one.  It should work for you.

<%
if(Request.Form('NAME')==''){
     Response.Write('<table width="448" border="0" cellspacing="0" cellpadding="0" background="../images/c_icbox.gif" height="365" align="center">');
     Response.Write('  <tr> ');
     Response.Write('    <td>');
     Response.Write('      <div align="center"><img src="images/c_ic_deny.gif"><br>');
     Response.Write('        <font face="verdana" size=2><b>!!! ERROR !!!</b><br>');
     Response.Write('        <b>Please Go Back & Check That You Have Filled In <br>');
     Response.Write('        All The Required Feilds</b></font><br>');
     Response.Write('        <a href="Javascript:history.back();"><<< Back</a></div>');
     Response.Write('    </td>');
     Response.Write('  </tr>');
     Response.Write('</table>');
     Response.Write('');
}
else {
    var Message, Key;
    for (Key in Request.Form) {
     Message += Key + " : " + Request.Form.Item(Key) + String.fromCharCode(13,10);
    }
     
    var objMail = Server.CreateObject('CDONTS.Newmail');
    objMail.From = Request.form('Email');
    objMail.To = 'myemail@mydomain.com';
    Response.Write('myemail@mydomain.com');
      objMail.Subject = '- My Form - ';
    objMail.Body = Message;
    objMail.Send;
    Response.Redirect('itWorked.asp');
}
%>
0
 
LVL 7

Author Comment

by:jay_eire
ID: 9882576
its saying

Microsoft JScript runtime (0x800A01B6)
Object doesn't support this property or method

line 94 is

objMail.Send;
0
 
LVL 6

Accepted Solution

by:
Mike_Metro earned 300 total points
ID: 9882585
sorry...try

objMail.Send();
0
 
LVL 7

Author Comment

by:jay_eire
ID: 9882603
EXCELLENT EXCELLENT!!!! Thank you sooooooooooo much!
thats working now!
Cheers Mate.
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882615
My pleasure.  
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882645
Glad it worked for you.  FYI, you haven't accepted my answer.  

Thanks.
0
 
LVL 6

Expert Comment

by:Mike_Metro
ID: 9882714
Great thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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