Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Microsoft JScript compilation (0x800A03EC) Expected ';'

Posted on 2003-12-05
17
Medium Priority
?
2,603 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 1200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

824 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