sezychink (2) [Avatar] Offline
#1
Am I the only one having problem with the ContentLoader object when use under IE 7?

Firefox doesn't give me any problems but IE throws a runtime error when it gets to the line
this.req.onreadystatechange=function() in the following bit of code:


net.ContentLoader.prototype.loadXMLDoc=function(url,method,params,contentType){
     :
    if (this.req){
        try{
            var loader=this;
            this.req.onreadystatechange=function(){
                net.ContentLoader.onReadyState.call(loader);
             }
            this.req.open(method,url,true);
            if (contentType){
                this.req.setRequestHeader('Content-Type', contentType);
             }
            this.req.send(params);
        }catch (err){
            this.onerror.call(this);
        }
    }
}

net.ContentLoader.onReadyState=function(){
    var req=this.req;
    var ready=req.readyState;
    var httpStatus=req.status;
        if (ready==net.READY_STATE_COMPLETE){
            if (httpStatus==200 || httpStatus==0){
            this.onload.call(this);
        }else{
            this.onerror.call(this);
        }
    }
}

I would like to know if anyone has actually got theirs workin fine under IE 7? I have the same problem with net.js in chapter 5.

Any solutionsuggestion would be most appreciated.
Thanks in advance.
Pascarello (208) [Avatar] Offline
#2
Re: Chapter 3 Question - ContentLoader object dos not work under IE 7
What is the exact error?

Eric
sezychink (2) [Avatar] Offline
#3
Re: Chapter 3 Question - ContentLoader object dos not work under IE 7
The error is "Access denied".