Extjs 및 Java 스크립트를 처음 사용합니다. 3 개의 텍스트 필드가있는 간단한 양식이 있습니다. 제출시 다음 페이지 (결과 페이지)로 이동하고 싶습니다. 제출 버튼을 클릭하면 경고 1이 표시되지만 경고 2와 3은 표시되지 않습니다. 응답이 다시 발생하지만 결과 페이지가로드되지 않습니다. 여기서 내가 뭘 잘못하고 있는데, 어떻게 다음 페이지를로드 할 수 있습니까? 어떤 도움을 주시면 감사하겠습니다.ExtJs 4 양식 제출 문제
Ext.require([
'Ext.form.*'
]);
Ext.onReady(function() {
var formPanel = Ext.create('Ext.form.Panel', {
frame: true,
title: 'New Todo',
width: 340,
bodyPadding: 5,
url: 'result.html',
ajaxSubmit:false,
fieldDefaults: {
labelAlign: 'left',
labelWidth: 90,
anchor: '100%'
},
items: [{
xtype: 'textfield',
name: 'id22',
fieldLabel: 'id22',
value: ''
},{
xtype: 'textfield',
name: 'Summary',
fieldLabel: 'Summary',
value: ''
}, {
xtype: 'textareafield',
name: 'Description',
fieldLabel: 'Description',
value: ''
}],
// Reset and Submit buttons
buttons: [{
text: 'Submit',
formBind: true, //only enabled once the form is valid
disabled: true,
handler: function() {
var form = this.up('form').getForm();
alert("1");
form.submit({
//clientValidation: true,
url: 'result.html',
success: function(form, action) {
alert("2");
},
failure: function(form, action) {
alert("3");
}
});
}
}],
});
formPanel.render('form-todo');
});
아래의 답변이 도움이 되었습니까? – dbrin