Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery check when PDF download is complete

I have a link which when clicked downloads a pdf file.

Is there a way using jQuery to tell when this has occurred. Basically I want the link to change from download to please wait. And when the download is complete it will change to something else.

The main reason is the pdf is generated server side and can take 10 or 20 seconds.

like image 545
jhanifen Avatar asked Oct 20 '10 21:10

jhanifen


1 Answers

There is no way to check this; there is no event like ondownloadready.

But there are some work-arounds... Check this question on stackoverflow.

like image 105
Harmen Avatar answered Nov 03 '22 02:11

Harmen