重寫表單提交方法,
Ext.override(Ext.form.Action.Submit,{
// privateprocessResponse : 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;
}
});