Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
In the next version of the component, if these codes would be add?
posted

Hi, 

I found that the javascript's operation of ajax may be error if  the client can't connect to the server.

To support the code stronger,this "try...catch" code should be add.

In the ig_shared.js(Version 7.3.20073.38) 

line:1306 

this code: 

this.execute = function ()
    {
        var exec = true;
        if(this.beforeCallback != null)
                exec = this.beforeCallback();
        if(exec && this._xmlHttpRequest)
        {

                if(this._progressIndicator != null)
                    this._progressIndicator.display();
                this.formatCallbackArguments();
                this.registerSmartCallback();
                this._xmlHttpRequest.open("POST", this.getUrl(), !this._waitResponse);
                this._xmlHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                this._xmlHttpRequest.onreadystatechange = this._responseComplete;
                this._xmlHttpRequest.send(this.getCallbackArguments());
        }
    }

should be changed:

 

this.execute = function ()
    {
        var exec = true;
        if(this.beforeCallback != null)
                exec = this.beforeCallback();
        if(exec && this._xmlHttpRequest)
        {
            try                 // code add           

               {
                if(this._progressIndicator != null)
                    this._progressIndicator.display();
                this.formatCallbackArguments();
                this.registerSmartCallback();
                this._xmlHttpRequest.open("POST", this.getUrl(), !this._waitResponse);
                this._xmlHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                this._xmlHttpRequest.onreadystatechange = this._responseComplete;
                this._xmlHttpRequest.send(this.getCallbackArguments());
            }catch(e){}         // code add        

}
    }

 

Thanks. 

 

 

Parents
No Data
Reply Children