Good afternoon in my timezone


I work as software developer in an enterprise, and recently i was exposed to ExtJs.
The application is already on production a few years ago and now i have to make evolution maintenance.
The problem is :
To download a file the application uses the following code:





Code:
  <div id="form" class="x-layout-inactive-content"> 
           <form action="ctrl" method="POST" name="downloadForm">
    <input type="hidden" name="resreq-0" /></form> 
                </div>
And in the button handler we have the following code:



Code:
 var resourceRequest = new eol.resource.ResourceRequest(config);     
    var requestJson=eol.resource.ResourceMgr.convertResourceRequestToJson(resourceRequest); 
    document.downloadForm[resourceRequest.id].value = requestJson;
    document.downloadForm.submit();
The config object contains the name of the field inside the form, and this is working fine.
But sometimes a problem happens, when a user click on the button to download the file, and this handler runs, if one request that is originated through the load of a store is still loading , the load of the store abort immediatly and a pop up appears, this just happen if the the ajax request originated by the load of the store is still running.


store.load();


The ExtJs version is the 2.3. Is it a well known problem , that a load of a store can not be running side by side with a traditional form submit ?
The workaround that i am tyring to do is using the ExtJs form object , like this way :





Code:
documentDownload.getForm().submit({ 
                url: 'ctrl', 
                params : { 
                        'resreq-0' : requestJson}, 
            success: function(form, action) { 
               Ext.Msg.alert("Success", action.result.msg); 
            }, 
            failure: function(form, action) { 
                       Ext.Msg.alert("Failure", action.result.msg); 
               } 
        });
I can see through the firebug that the POST is done like it should, and is working fine, but the server answer,in this case the file , do not open in the browser , the server sends the file and the browser simply do nothing.
This is because it is an Ajax request ?


Bottom line , how can i download a file through an Ext.form or at least through another workaround ?


With the best regards
Thanks in advance