title: Can you use JavaScript to detect a file download window created server side?
body: <p>I have a jQuery plugin I use to dynamically create and render a form on a default.aspx asp.net page, then submit it.  The page it gets submitted to is a pdf.aspx page.  The page builds a PDF then uses <code>Response.Write</code> to write the file (application/pdf) to the browser.  I use the same method to render XLSX files to the browser as well.  It works really great, but I need a callback or some event to tell the button when to stop spinning.  This prevents the user from continuously clicking the Excel or PDF buttons.  Does anyone know a way to detect the file dialog window when it was not created using JavaScript?  I am also open to other methods of callback from the server side as well.</p>