AJAX Problem - No response text in FireFox, but ok in IE

Posted by Taiba on Stack Overflow See other posts from Stack Overflow or by Taiba
Published on 2010-06-07T11:34:12Z Indexed on 2010/06/07 11:42 UTC
Read the original article Hit count: 173

Filed under:
|

Hi,

I am making a simple AJAX call to an external site. It works ok in IE, but in Firefox, not response text is returned.

I think it might have something to do with the response being "chunked", but I'm not sure.

Any ideas? Thanks.

function loadXMLDoc() {
var xmlhttp;
var urlString = "http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=6025&Destination_Postcode=6055&Country=AU&Weight=100&Service_Type=STANDARD&Length=100&Width=100&Height=100&Quantity=2";
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4) {
        window.alert(xmlhttp.responseText);
    }
}
xmlhttp.open("GET", urlString, true);
xmlhttp.send();
}

© Stack Overflow or respective owner

Related posts about java

Related posts about AJAX