• 1 reply
  • Latest Post - ‏2014-08-26T15:51:07Z by DGawron
Nischitha Rai
Nischitha Rai
1 Post

Pinned topic Display wait page / spinner wheel while downloading document

‏2014-08-25T15:22:31Z |

I am using Content Launch Action builder to dynamically download a document based on the response received from the web service. However, it takes too long to download some of the documents in which case we want to display a wait page/ spinner wheel while user is waiting for the document to be downloaded. 


Any pointers / suggestions would be appreciated. 

Updated on 2014-08-25T16:50:03Z at 2014-08-25T16:50:03Z by Nischitha Rai
  • DGawron
    580 Posts

    Re: Display wait page / spinner wheel while downloading document


    I've never tried to do this before, but the way I'd first approach the problem is to determine why the download is slow.  Assuming that the majority of time is spent preparing the doc that will be downloaded you could try a 2 step solution.  On the initial page you have a link that when clicked calls an action that invokes the web service to prepare the doc for download.  When the web service completes and you have the doc return a page fragment containing a second link that calls the CLA action to start the download to your browser.  I think you can get the spinner by having that first link do a partial page refresh of a specific page location where the page fragment containing the CLA link will appear.  So when you click on that first link the spinner should appear waiting for the action to complete and update the initial page with a page fragment containing the CLA link.  Then you click the second link and the download starts immediately.

    I think you could also write some clever JavaScript that automatically causes the CLA download to commence once the initial page is updated with the page fragment.  But I'd recommend trying to get the 2 step solution going first.