We have a code
JavaScript:
function Download() {
location.href = "FileDownloadHandler.ashx";
}
aspx page:
<input type="button" value="Download" onclick="Download();" />
"FileDownloadHandler" will download the file to the user.
Actual result:
The code below location.href is executed immediately without completion of the handler.
Expected Result:
I want to stop the execution of "SomeCode" until the handler completes the execution.
How can i achieve this?
Thanks in advance.
source
share