
Originally Posted by
Condor
waitMsg is simply a text.
waitMsgTarget can be:
true - show a standard mask with a loading message.
Element/DOM/element id - The target element for the mask (in case you want to mask more than the panel itself).
false/0/null/undefined - show a wait MessageBox.
thsi dosent seem to work
Code:
Ext.getCmp('purchaseFieldSet').addButton(
new Ext.Button({
text: 'ok',
minWidth: 100,
listeners: {
click: function() {
HERE!!!! Ext.getCmp('purchaseForm').getForm().waitMsgTarget = true;
Ext.getCmp('purchaseForm').getForm().submit({
clientValidation: true,
timeout: 10000,
url: '/api/purchase/submitdetails',
params: {
x: 'x'
},
success: function(form, action) {
if(action.result.success == 'true'){
}
Ext.Msg.alert('Success', action.result.msg);
},
failure: function(form, action) {
switch (action.failureType) {
case Ext.form.Action.CLIENT_INVALID:
Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
break;
case Ext.form.Action.CONNECT_FAILURE:
Ext.Msg.alert('Failure', 'Ajax communication failed');
break;
case Ext.form.Action.SERVER_INVALID:
Ext.Msg.alert('Failure', action.result.msg);
}
}
});
}
}
})
);
Ext.getCmp('purchaseForm').add(Ext.getCmp('purchaseFieldSet'));
Ext.getCmp('purchaseForm').doLayout();
do you recon it could be because its nto a standard submit ? but a button that does an ajax call submit