0

In my application, I have a link named "Export to PDF". On click of that link I will submit a form and I am writing PDF files to that response object which would show modal-dialog in the browser (example-image below)

enter image description here

Requirement is to show an progress-bar using jQuery which would stop once this dialog box pops-up. Please tell how to identify this and start/stop animation. Please help me on this

Arun
  • 3,440
  • 11
  • 60
  • 108

1 Answers1

0

I don't think you can get that kind of event from the brower. In the other hand you do know when the conversion to PDF ends right ?

Personally I would use socket.io to get a nice progress bar.
Here is an example app of a progress bar updated with socket.io.

But from the wonderful world of java you probably just be better doing a long polling.

Community
  • 1
  • 1
3on
  • 6,291
  • 3
  • 26
  • 22
  • Thanks. But it dont suit my requirement. Am using struts-jquery combination. Is there not any other possibility ? only to go for third party tools ?? – Arun Sep 13 '12 at 06:36
  • They a re plenty of ways http://stackoverflow.com/questions/8801014/socket-io-xhr-polling-vs-flashsocket-and-websocket this is one. – 3on Sep 13 '12 at 06:41