I need a callback on file download. Now I can not do this, because I have to set standardSubmit
to true
. This is how it looks like in my case:
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"}});
It all looks good with one minor exception - I can not set a callback. This is what I wanted to achive:
panel.getForm().submit({url:"controller/download.php",callback:function () {
... do something when file was downloaded (for example - hide a loading mask)
}}});