Solved

Microsoft JScript compilation (0x800A03EC) Expected ';'

Posted on 2003-12-05
17
2,562 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
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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