2013-05-03 72 views
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}'; 

但我的一切作为回应,是

{成功:真正}空白页

没有消息,没有警觉,没有回调...

请帮忙,真的要疯了!

回答

2
standardSubmit: false,//true, <--------- 
+3

Nooooooooo请不那么容易!为此疯狂......现在它的作品...真的非常感谢! – Bia1974 2013-05-03 12:11:40

0

解决了standardSubmit:假 有时候,一件容易的事情是看不见的:d 我想什么办法能解决我的问题,以任何方式改变了我的服务器,但我没有找到正确的答案。 谢谢弗拉德!