function createRequestObject() {var tmpXmlt; if (window.XMLHttpRequest) { // Mozilla, Safari would use this method ... tmpXmlt = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE would use this method ... try { tmpXmlt= new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e1) {} try { tmpXmlt=new ActiveXObject("MSXML2.XMLHTTP.3.0"); } catch (e2) {} try { tmpXmlt= new ActiveXObject("Msxml2.XMLHTTP"); } catch (e3) {} //Microsoft.XMLHTTP points to Msxml2.XMLHTTP.3.0 and is redundant throw new Error("This browser does not support XMLHttpRequest."); } return(tmpXmlt); } var xmlhttp = createRequestObject(); function makeGetRequest() { xmlhttp.open('get', 'data.xml',false); xmlhttp.onreadystatechange = processResponse; xmlhttp.send(null); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)