• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

ASP Expected End of Statement Error

I'm getting the following error on my first line of code below the error message...What am I doing wrong?

Microsoft VBScript compilation error '800a0401'
Expected end of statement

xmlhttp=new XMLHttpRequest();
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")'
1 Solution
Wayne BarronCommented:
Need to see more code.

Try removing the ;

xmlhttp=new XMLHttpRequest()
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
Shouldn't this be javascript, not ASP?

Creating an XMLHttpRequest object is done with one single line of JavaScript:
In all modern browsers:
var xmlhttp=new XMLHttpRequest()
In older Microsoft browsers (IE 5 and 6):
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")

[ Ref: http://www.w3schools.com/XML/xml_http.asp ]
saturationAuthor Commented:
Yes, thank you...I'll have more questions about this in the Javascript area.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now