I am working on a servlet that takes fairly long to process, and I
would like to keep the user updated on the progress with a status bar.
I have already finished the necessary javascript and servlet code: The
local script regularly polls the servlet, which uses the session to
check on the progress of the other program and reports back with an
XML file. The local script then updates the progress bar as necessary.
This works nicely until I actually place it into a form. Apparently,
submitting a form and "leaving" the current page in the browser
somehow suspends the Javascript until the new page is built, which
means that nothing happens while the servlet result page is loading.
How can I make the progress bar script run until the server actually
sends a response to my form submission, and the page is rebuilt?