0

NOTE: I'm using .Net and IIS 7 for the server.

I'm trying to display a warning to the user while download is in progress and the user tries to close the browser. I can display the warning using the "windows unload" event in JavaScript, however, I'm trying to unhook this event once download (or upload for that matter) is complete. My dilemma is that the event to warn the user persists even though the upload/download is long complete. Any ideas how I could determine when download is complete so that I could unhook this event? Would appreciate any advice!

TheDude
  • 1,421
  • 4
  • 29
  • 54
  • The browser should be taking care of managing downloads. What are you trying to manage exactly? – Jesus Ramos Sep 23 '13 at 23:13
  • http://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download – Paco Sep 23 '13 at 23:19
  • @JesusRamos: Firefox and IE by default don't display a warning if the user tries to close the browser while download is in progress. Chrome does this, but doesn't do it when using AJAX POST on upload. I'm trying to display a warning message uniformly across all browsers when the user tries to close the browser when uploading/downloading. – TheDude Sep 23 '13 at 23:26
  • @Paco: Thank you for that link. I will definitely look into trying to implement that. – TheDude Sep 23 '13 at 23:27

0 Answers0