2
我要瘋了。我讀過論壇,問題,答案,沒有辦法獲得回調回應! 我的代碼:無法在表單提交中回覆回覆
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');
}
});
}
}
}]
});
沒有辦法獲得成功或失敗! 我的服務器發回這樣的:
ResponseInfo.ResponseNo := 200;
ResponseInfo.ContentType := 'text/html';
ResponseInfo.ContentText := '{success:true}';
但我的一切作爲迴應,是
{成功:真正}空白頁
沒有消息,沒有警覺,沒有回調...
請幫忙,真的要瘋了!
Nooooooooo請不那麼容易!爲此瘋狂......現在它的作品...真的非常感謝! – Bia1974 2013-05-03 12:11:40