I have a link to a PDF on my site. I would like the page to enable another button at the end of your download.
But the question is: is it possible only with javascript / jquery?
If yes, how would it work?
I have a link to a PDF on my site. I would like the page to enable another button at the end of your download.
But the question is: is it possible only with javascript / jquery?
If yes, how would it work?
Use the jquery plugin called fileDownload, use example:
//
//With jquery.fileDownload.js
//custom use with promises
//
$(document).on("click", "a.fileDownloadPromise", function () {
$.fileDownload($(this).prop('href'))
.done(function () { alert('File download a success!'); })
.fail(function () { alert('File download failed!'); });
return false; //this is critical to stop the click event which will trigger a normal file download
});
Download here = link
Example working here = link