I am using window.location to download a file from the web server. The process on the server to create the file takes a while and so I display a progress bar in the browser.
The code line after window.location hides the progress bar but it executes right after window.location which executes immediately, therefore the progress bar doesn't show.
How do I show the progress bar until the browser gets the file? Is there an event which fires when this happens? I would like to attach to that event and that's where I can hide the progress bar.
Addition:
The window.location is going to an asp.net MVC action method (same app) which returns a FileStreamResult.