How do I get the XMLHttpRequest object?

John Zukowski

Depending upon the browser...


if (window.ActiveXObject) { // Internet Explorer
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) { // And the rest
    http_request = new XMLHttpRequest();
}
About | Sitemap | Contact