All pastes #763080 Raw Edit

Untitled

public text v1 · immutable
·published 2007-11-06 03:44 UTC
rendered paste body
this.obj = null;
    if (window.XMLHttpRequest)
        this.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
		    {
		        this.obj = new ActiveXObject(ieversions[i]);
		    }
		    catch(e)  { }
        }
    }