My struts project produces reports from a database. Some of the queries take a while to return all their results, in the meantime the user sees a blank page. Is there a way to display a "Please wait" page while the query runs, which is then replaced by the results page when the query is completed.
Another good way of doing this is by using a <div> tag initially setting it to NOT be visible. Using the javascript nsubmit, make the div visible and when the page changes the 'Please Wait' image goes away.
Srikanth Shenoy
author
Ranch Hand
Joined: Jan 24, 2004
Posts: 184
posted
0
Originally posted by Brad Balmer: Another good way of doing this is by using a <div> tag initially setting it to NOT be visible. Using the javascript nsubmit, make the div visible and when the page changes the 'Please Wait' image goes away.
Brad, That solution has a glitch. The DIV does not necessarily make trips back to the server, which means the long running transaction times out after a while since the browser feels that the site is down. Sometimes the web server times out the socket connection since it has not receieved any response from the application server. Hence it is essential to make the heartbeat check. This is exactly what the auto-refresh does.