Aaryn015
4 Oct 2007, 5:00 PM
Hi all,
I have a form that works just fine and displays a waiting message. It also saves and retrieves data fine.
I'm just trying to figure out how to get the result status of a submit when a user clicks on the Save button. I found an thread on the issue and Animal gave a quick response of:
return {success: true, info: "Success"}
This seemed to help the original help request, but I can't work out the context in which this statement is used in the code. My attempts are all errors.
Here is the code for my Save button on the form:
// Add the save button that submits the form
siteInfoForm.addButton('Save Changes', function(){
if (siteInfoForm.isValid()) {
siteInfoForm.submit({
params:{
action:'submit',
id:defaultData.getAt(0).data.siteId
},
waitMsg:'Saving...',
});
}else{
Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
}
}, siteInfoForm);
Any help would be appreciated. I am just looking for a way to open a dialog to say the record was saved.
Cheers
Aaron
I have a form that works just fine and displays a waiting message. It also saves and retrieves data fine.
I'm just trying to figure out how to get the result status of a submit when a user clicks on the Save button. I found an thread on the issue and Animal gave a quick response of:
return {success: true, info: "Success"}
This seemed to help the original help request, but I can't work out the context in which this statement is used in the code. My attempts are all errors.
Here is the code for my Save button on the form:
// Add the save button that submits the form
siteInfoForm.addButton('Save Changes', function(){
if (siteInfoForm.isValid()) {
siteInfoForm.submit({
params:{
action:'submit',
id:defaultData.getAt(0).data.siteId
},
waitMsg:'Saving...',
});
}else{
Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
}
}, siteInfoForm);
Any help would be appreciated. I am just looking for a way to open a dialog to say the record was saved.
Cheers
Aaron