View Single Post
  #1 (permalink)  
Old May 11th, 2006, 12:39 PM
50000 50000 is offline
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default book.htm problem in chapter 04

I tested book.htm, but didn't get correct result, try debug and found:

function init(sFilename) {
    var oReq = zXmlHttp.createRequest();
    oReq.onreadystatechange = function () {
        alert(oReq.readyState)
        if (oReq.readyState == 4) {
            // only if "OK"
            alert(oReq.status)
            if (oReq.status == 200 || oReq.status == 0) {
                transformXml(oReq.responseText);
            }
        }
    };
    oReq.open("get", sFilename, true);
    oReq.send();
}


in FireFox "oReq.readyState" always show 1, and IE "oReq.status" only show 0. I use Firefox 1.0.7 and IE 6.0. Can anybody give me some help?

Thanks
Reply With Quote