function xmlRequest(url) { //Пробуем вызвать объект в Firefox, Opera 8.0+, Safari, etc. if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = parseData; xmlHttp.open("GET", url, true); xmlHttp.send(null); //Выдало ошибку? Пробуем в Осле } else if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); if (xmlHttp) { xmlHttp.onreadystatechange = parseData; xmlHttp.open("GET", url, true); xmlHttp.send(); } } }