var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("GET", url, 0); xmlhttp.send(); return(xmlhttp.responseText); var xmlhttp = null; }
One thing…if you attempt to use this code and you try to load up an URL on the Internet (ie. a fully qualified domain name) instead of a local server, you’ll receive the error: msxml3.dll error ‘80070005’ Access Denied. There’s probably a fix but I’m only calling local servers so it’s okay in my case.
Also, I did initially get an IE pop-up that asked me to approve Blocked Content so when I put this out on the Intranet, I’ll have to ask for a GPO modification that enables “Allow active content to run in files on My Computer” (usually found in IE -> Tools -> Advanced Settings). Setting IE parameters in GPO, FYI, is set at Start -> Run -> gpedit.msc -> User Config -> Windows Settings -> Internet Explorer Maintenance -> Security -> Security Zones and Content Rating -> Import Current Settings.