I'm trying to GET or POST a request to a server. The code below works fine in Firefox, Safari, Chrome and IE7+ but fails in IE6 in spite of the xmlHttpCreate function being copied and pasted straight from Microsoft's MSDN site. The place where IE6 fails is on the oReq.send() line. It appears to create an activeX object but just won't send it. I have also tried oReq.send(null) and oReq.send("") but neither works.


function _call(url){

oReq = xmlHttpCreate();
if (oReq != null) {
//oReq.open("GET", url, false);
oReq.open("POST", url, false);
oReq.send(); // <=============== this is where IE6 fails
return oReq.responseText;
}
else {
alert("AJAX (XMLHTTP) not supported.");
}


}

function xmlHttpCreate(){
if (window.XMLHttpRequest) {
return new window.XMLHttpRequest;
}
else {
try {
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
catch(ex) {
return null;
}
}

}

Any help with this would be greatly appreciated.