'Is it possible to get the download complete event using JavaScript at client end?

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..



Solution 1:[1]

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);    

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohit Munjal