Solved

Microsoft JScript compilation (0x800A03EC) Expected ';'

Posted on 2003-12-05
17
2,574 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Select case on click 3 31
Filktering Alphabetically 8 46
SP result not being displayed 5 69
isNaN issue on the Table input text 2 42
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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

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