Home > CRM 2011, JScript > Object doesn’t support this property or method XMLHttpRequest error – FIX

Object doesn’t support this property or method XMLHttpRequest error – FIX

Hi,

I was getting “object doesn’t support this property or method jquery” error when I was initializing

var request = new XMLHttpRequest();

Reason :-

  • This is a problem with Internet Explorer browser (ActiveX to be precise)

Fix :-

  • If the browser is detected as Internet Explorer, load ActiveX instead of XMLHttpRequest
  • Below condition check would solve the problem

var request;

if ($.browser.msie) {

request = new ActiveXObject(“Microsoft.XMLHTTP”);

} else {

request = new XMLHttpRequest();

}

🙂

Advertisement
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: