jQuery loading screen on form submit with file response
<p>I have an HTML form. When submitted it creates an Excel file and returns it.
On all other forms I have a loading screen shown in the <code>onSubmit</code> function and hidden in the <code>document.ready</code> function, but when a file is returned, there is no <code>document.ready</code> and so my loading screen doesnt hide.</p>

<p>I tried jQuery form plugin with callback function, but this way I was not able to normally show the response page on the other forms. The same is the case with <code>$.post()</code> function with a callback.</p>

<p>All I want is to call my <code>loadingScreenHide</code> function when the form submit is finished and leave the rest as normal.</p>

<p>Any ideas? </p>

<p>Thanks.</p>

<p>Code i tryed is like:
with form plugin callback function (return true; doesnt seem to work) : 
$('form').ajaxForm(function () {activateDeactivateScreen('hidden'); return true; });</p>

<p>or with post instead:
$.post($('form').attr('action'), $('form').serialize(), function () {activateDeactivateScreen('hidden'); return true; });</p>

<p>the 2 main problems are when i use normal submit i dont have a callback and when i get a callback i dont have the normal submit/page load</p>

<p>i also had the idea of changing my java server pages to save the file temporary and redirecting to a download, but this way i would have to change about 20-30 java sources, so i would prefer a javascript solution</p>
