• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Callback when using Valence.util.download

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Callback when using Valence.util.download

    I would like to display a waiting..... screen when i am using the valence.util.download helper. I have several apps that creates the file on the fly on the backend and then sends the file back to browser....but there is no callback property. so the user clicks the button and then nothing happens for several seconds and magically the file starts to download...the user sometimes gets confused and clicks the button again. I know the util.download uses the ajax request in ext but i can't figure out how to create the callback? Does anyone have any luck with this? thanks!

    Ryan

  • #2
    A download is not a regular Ajax request. It's more like a call to another page that's hidden that will trigger the download. The best way to do this is break your process into two steps. Do a regular Ajax call to an RPG that will generate your file to a temp folder on the IFS (include a timestamp or something on the file name to make it unique). While this call is taking place mask the screen. Then in the callback of that Ajax call unmask the screen and trigger the download. This always works like a charm when it takes some time to generate the file.

    Comment


    • #3
      awesome...i had given this a thought but misunderstood the download utility as an ajax call. Thanks for the guidance.

      Comment

      Working...
      X