Jump to content

how to detect if download has finished in order to hide the spinning loading gif ?


Recommended Posts

Hi,

 

is there such way/method/strategy to detect if the downloading of a file is finished?..my problem is like this.

 

Scenario:

when click the report generator button, a loading wheel icon appears because it takes a while to generate the spreadsheet...and now, when the download has finished and the spreadsheet was saved in the client's machine, the loading wheel icon is still there spinning.. the only way that I think of to remove that spinning wheel is by detecting if the downloading is finished and then hide the spinning wheel ..so how ? :confused:

If you run the download via a PHP script, you can have it update a value somewhere to indicate when it has finished sending the file. Note though that this would merely indicate that it sent the file, not that it was successfully received on the end-users machine.

 

As for the issue of just hiding the loading icon, you may need to be a bit more descriptive of how you have things setup. It sounds like you'd need to be constantly polling the server to check the generation/download status the way you describe things right now.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.