extjs의form 폼 제출 버그

2501 단어 질문
자세히 보기
Ext.override(Ext.form.Action.Submit, {
                            processResponse: function(response){
                                this.response = response;
//다음 코드를 추가하면 OK
                               ////////////////////////
                                var data = response.responseText;
                                if (data.indexOf('
                                    response.responseText = data.substring(data.indexOf('{'), data.length - 6); 
 
                                    this.response = Ext.JSON.decode(response.responseText);
                                }
                                ///////////////////////////     
                                if (!response.responseText) {
                                    return true;
                                }
                                this.result = this.handleResponse(response);
                                return this.result;
                            }
                        });
========================= ===================================
, pre ?

Ext.override(Ext.form.Action.Submit, {
                            processResponse: function(response){
                                this.response = response;
                                // OK
                                ////////////////////////
                                var data = response.responseText;
                                if (data.indexOf('
                                    response.responseText = 
 data.substring(data.indexOf('{'), data.lastIndexOf('}')+1); 
 
                                    this.response = Ext.JSON.decode(response.responseText);
                                }
                                ///////////////////////////     
                                if (!response.responseText) {
                                    return true;
                                }
                                this.result = this.handleResponse(response);
                                return this.result;
                            }
                        });

좋은 웹페이지 즐겨찾기