Forum Moderators: open
var http = null;
if(window.XMLHttpRequest)
http = new XMLHttpRequest();
else if (window.ActiveXObject)
http = new ActiveXObject("Microsoft.XMLHTTP");
The problem is that I can't test how and when IE will give an ActiveX warning. I've heard that things got a lot stricter with WinXP SP2, and IE7 supposedly goes even further. But I don't have access to either of these for testing.
Any recommendations, experiences, and "best practice" tips will be appreciated.
Thanks,
Matthew
The best thing to do would be to test it live with a fresh IE installation.
And, yes ... "locally" means when you run it on your machine, and did not get it from a webserver.
Hmmm. No, that's when the page instatiating the object is running within the local file system, rather than a webserver. So, with XP SP2, it seems you need to be running a server to test the script.
1) AFAIK, XMLHTTPRequests can't actually call pages from within the file system.
2) As Doc says, there are big differences. On my Win 2000, I can instantiate an XMLHTTP request in IE of a local file and make requests for resources from remote servers. In other words, I get cross-domain access too.