1

I want to show an "In Progress" and "Completed" message when a user downloads a file. A user downloads a file by clicking a button:

<input id="pdfBtn" type="button" value="Download PDF..." onclick="location.href='@Url.Action("GetPdfFile")'"/>

I have some jQuery that fades out the button and shows the "In Progress" message when a user clicks the button, but I'm not seeing a way to know when the file finishes downloading. I've tried a few different approaches that didn't work and my Google queries aren't returning anything helpful. Suggestions?

RickL
  • 3,318
  • 10
  • 38
  • 39
barbajoe
  • 547
  • 5
  • 15
  • 4
    Target a server-page instead that sets a cookie and then returns the pdf. Then, in a setInterval, look for that cookie to become available. when it's available, you know the download is finished. – Kevin B Oct 18 '13 at 19:27
  • 1
    Like Kevin said. http://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download – TheProdigy Oct 18 '13 at 20:26

0 Answers0