Extjs的表單提交無法執行success

重寫表單提交方法, 

Ext.override(Ext.form.Action.Submit,{ 

    // private  
    processResponse : function(response){  
        this.response = response;  
        //增加下面幾句代碼就OK啦  
        ////////////////////////  
        var data = response.responseText;  
        if(data.indexOf('<pre>') != -1) {  
          response.responseText = data.substring(5, data.length-6);  
          this.response = Ext.util.JSON.decode(response.responseText);  
        }      
        ///////////////////////////       
        if(!response.responseText){  
            return true;  
        }  
        this.result = this.handleResponse(response);  
        return this.result;  
    }  
});
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章