Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there an event for a file download?

 
Nickolas Case
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application that will return data in three different ways, two of which being a file download. The third being an HTML page. When a user clicks the HTML button, a throbber pops up while the page is built(DB queries and report generation take 15 to 20 seconds) and goes away once the HTML is ready. When the user clicks one of the other two options for a download, nothing happens. This is the issue. Is there a way to pop up the throbber for the download portions and listen for the open/save/cancel dialog box? That way the throbber doesn't just stay there after the download.

I am using Spring MVC. Any suggestions?
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you implement this throbber pops up?
 
Nickolas Case
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The throbber pops up using jquery. I can get the throbber to show for any of the views, it's getting the throbber to disappear once the file starts to download that I am having difficulty with. For the HTML piece, the jsp uses a javascript redirect to relaod the page the throbber is on. I could set a timeout, but I can't guarantee the file will be ready for download by then.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic