All pastes #763084 Raw Edit

Mine

public text v1 · immutable
·published 2007-11-06 03:47 UTC
rendered paste body
obj = null;
if (window.XMLHttpRequest)
    obj = new XMLHttpRequest();
else if (window.ActiveXObject)  // if IE
{
    var ieversions = ['Msxml2.XMLHTTP','Microsoft.XMLHTTP','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0'];

    for(var i=0; !this.obj && i<ieversions.length; i++)
    {
	    try
	    {
	        obj = new ActiveXObject(ieversions[i]);
                break;
	    }
	    catch(e)  { }
    }
}