Reputation: 105
I'm going crazy. I've read forum, questions, answers, no way to get callback response!! My code:
var myFormTest = new Ext.form.FormPanel({
renderTo: 'divAllegati',
width: 500,
title: 'Allegati',
bodyPadding: '10 10 0',
standardSubmit: true,
items: [{
xtype: 'textfield',
fieldLabel: 'Name',
name: 'ciao',
value: 'ciao'
},{
xtype: 'filefield',
id: 'form-file',
emptyText: 'Seleziona un file',
fieldLabel: 'Allegato',
name: 'photo-path',
buttonText: '',
buttonConfig: {
iconCls: 'upload-icon'
}
}],
buttons: [{
text: 'Save',
handler: function(){
if (myFormTest.getForm().isValid()) {
myFormTest.getForm().submit({
url: '/uploadAllegati',
waitMsg: 'Caricamento allegati...',
success: function (form, action) {
Ext.Msg.alert('Success');
},
failure: function (form, action) {
Ext.Msg.alert('Failure');
}
});
}
}
}]
});
No way to get success or failure!! My server send back this:
ResponseInfo.ResponseNo := 200;
ResponseInfo.ContentType := 'text/html';
ResponseInfo.ContentText := '{success:true}';
But all I have as response, is a blank page with
{success:true}
No message, no alert, no callback....
Please help, really going crazy!
Upvotes: 2
Views: 3000
Reputation: 105
Solved with standardSubmit: false Sometimes, easy thing are invisible :D I tried any way to solve my problem, changed my server in any way, but I didn't find the right answer. Thanks Vlad!
Upvotes: 0