PDA

View Full Version : Strange Form.Submit behavior



Mango_lier
6 May 2010, 3:43 PM
I am seeing a GET request right after successful POST request. I have searched my code for this possible behavior but seems like it is originating from somewhere else. Am I missing something in the config?


if (this.getForm().isValid()) {
this.getForm().url = Url;
this.getForm().submit({
scope: this,
params: Cmd,
waitMsg: waitMsg,
reset: false,
method: 'POST',
failure: function(form, action) {
Ext.MessageBox.alert('Server Error (' + action.response.status + ')', 'Error Message: ' + action.response.statusText);
},
success: function(form, action) {
if (action.result.errors != undefined) {
Ext.Msg.show({
title: 'Server Error',
msg: action.result.errors,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
} else {
if (this.grid) {
this.grid.store.reload();
this.findParentByType('myProject4recexusersRecordDlg').hide();
}
}
}
});
} else {
Ext.MessageBox.alert('Error', 'Please fix the errors noted, some fields may be required');
}

MiamiCoder
7 May 2010, 11:41 AM
Could this.grid.store.reload() be sending the request?

Mango_lier
9 May 2010, 5:46 PM
Found it, it was a redirect on the server side on POST causing the issue.