ExtJs 3.4 trigger on download

150 views Asked by At

In my application, I have to block the user interaction while the server creates an Excel file to download and 'unblock' it once the file is available to download.

CODE SNIPPET

...
myGrid.setDisabled(true);
Ext.getBody().mask("myMessage");
...

Ext.Ajax.request({
   url :  myUrl,
   method : 'POST',
   form: Ext.fly('frmDummy'),
   isUpload: true,
   callback: function() {                                                       
     myGrid.setDisabled(false);
     Ext.getBody().unmask();
   } 
});

The problem is that it does not enter the callback function.If I set the property isUpload: false the callback function works but the application does not download the file.

My objective is to unblock the grid once the file is ready to download. I'm open to other alternatives.


PS: I have read that an Ajax request is not the best choice to download a file but this is not my code and it is used as an standard in the application.

0

There are 0 answers