Ext.create('Ext.form.Panel', {
title: 'Simple Form',
bodyPadding: 5,
width: 350,
url: 'save-form.php',
layout: 'anchor',
defaults: {
anchor: '100%'
},
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank: false
},{
fieldLabel: 'Last Name',
name: 'last',
allowBlank: false
}],
buttons: [{
text: 'Reset',
handler: function() {
this.up('form').getForm().reset();
}
}, {
text: 'Submit',
formBind: true,
disabled: true,
handler: function() {
var form = this.up('form').getForm();
if (form.isValid()) {
form.submit({
waitMsg:'wait...',
success: function(form, action) {
//Ext.Msg.alert('Success', 'ok');
},
failure: function(form, action) {
//Ext.Msg.alert('Failed', 'no');//注释掉之后界面就不能操作
}
});
}
}
}],
renderTo: Ext.getBody()
});
如题,求解决方法,取消alert方法后有什么方法可以继续操作界面?
万分感谢
title: 'Simple Form',
bodyPadding: 5,
width: 350, url: 'save-form.php', layout: 'anchor',
defaults: {
anchor: '100%'
}, defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank: false
},{
fieldLabel: 'Last Name',
name: 'last',
allowBlank: false
}],
buttons: [{
text: 'Reset',
handler: function() {
this.up('form').getForm().reset();
}
}, {
text: 'Submit',
formBind: true,
disabled: true,
handler: function() {
var form = this.up('form').getForm();
if (form.isValid()) {
form.submit({
waitMsg:'waiting...',
success: function(form, action) {
//Ext.Msg.alert('Success', 'ok');
},
failure: function(form, action) {
//Ext.Msg.alert('Failed', 'no');
}
});
}
}
}],
renderTo: Ext.getBody()
});
代码发错了,抱歉