1

I have a download link, which downloads a file say "down.exe" from some path say "://root/download/down.exe".

The "down.exe" is just placed at server path "/download/"

Is there any JavaScript methods, to get the download complete event in this case?

Or if I have do some other methods, please suggest me..

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • 1
    There is no JavaScript event for download complete. What is your goal? Perhaps there's a better method to achieve what you want. – Jivings Jan 05 '15 at 09:38
  • thanks @jivings: i want to show download success message for user after download completes. Is there any better method?? – user3829409 Jan 05 '15 at 09:41
  • may be this could help you with jquery [http://stackoverflow.com/questions/11265917/javascript-source-file-download-progress][1] [1]: http://stackoverflow.com/questions/11265917/javascript-source-file-download-progress – donald123 Jan 05 '15 at 09:41

1 Answers1

0

Hey for downloading something you need complete postback of the page.You can try this and in PageLoad event of GenerateFile.aspx you can write your downloading code.

var iframe = document.createElement("iframe");
  iframe.src = "GenerateFile.aspx;
  iframe.style.display = "none";
  document.body.appendChild(iframe);