asp.net - close jquery UI dialog when file download begins -


I am using an ASP.NET MVC site which is a link to the ASP.NET webform page, Does. When the download starts I would prefer to close my jquery UI dialog. Can javascript / jquery event that I use to accomplish this?

I have found an example of what I want to do, but since I am using MVC instead of the webform, I do not think it would be useful.

Two possibilities:

  1. Target your form & Lt; Iframe & gt;
  2. a hidden in and lt; Iframe & gt; On the Windows object, close your dialog with the "Load" handler on the Window object, the clients create a random string and post it with the form, and then to see if it contains random strings, Start a polling loop to see document.cookie . The server should set such a cookie, which is a random string, and it should be done that the header to be sent to the file. When the client sees the polling loop cookie, he can close the dialog.

Comments