Over a million developers have joined DZone.

XMLHttpRequest For IE

DZone's Guide to

XMLHttpRequest For IE

Free Resource
XMLHttpRequest for IE
 - support onload event handler
 - you can modify "XMLHttpRequest.prototype" for debugging, tracing and AOP style programming.

if(typeof ActiveXObject == "function" && typeof XMLHttpRequest == "undefined"){
	XMLHttpRequest = function(){
		var self = this;
		var props = "readyState,responseText,responseXML,status,statusText".split(",");
		this.readyState  = 0;
		this.__request__ = new ActiveXObject("Microsoft.XMLHTTP");
		this.__request__.onreadystatechange = function(){
			for(var i=0;i

you can trace request.open like this.

var open_old = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(){
    alert("open called!");
    return open_old.apply(this,arguments)


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}