Extjs と Java スクリプトは初めてです。3 つのテキスト フィールドを持つ単純なフォームがあります。送信すると、次のページ(結果ページ)に行きたいです。送信ボタンをクリックすると、アラート 1 が表示されますが、アラート 2 と 3 が表示されませんでした。firebug に応答が戻ってくるのは確認できますが、結果ページが読み込まれません。ここで何が間違っていますか、次のページを読み込むにはどうすればよいですか? どんな助けでも大歓迎です。
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');
});