我需要回调文件下载。现在我不能这样做,因为我必须将standardSubmit
设置为true
。这就是我的情况:
var panel = Ext.create('Ext.form.Panel', {
method:'POST',
standardSubmit: true,
items:[{
xtype: "textfield",
name: "field1"
},...] // other similar fields
// based on those panel fields, I create a file on the server side
// and return it to the client
panel.getForm().submit({url:"controller/download.php"}});
这一切看起来都不错,只有一个小例外 - 我无法设置回调。这就是我想要实现的目标:
panel.getForm().submit({url:"controller/download.php",callback:function () {
... do something when file was downloaded (for example - hide a loading mask)
}}});