Forums Register Login

please wait page

+Pie Number of slices to send: Send
Hello,
I have a JSP page that loads data from database. In this page I have a routine that checks if something was returned from the database. While nothing is returned, a "Please wait, menus are being searched..." message is displays. The problem is that the very first time page is loaded I don't see the message, but then if I perform search again the message appears. The way search is brought up is thru a pop-up window from the main page. Below is part of code from search page. Any suggestions are appreciated.

Also, here is what appears in page source on the first try:

And this is what appears on all of the following trys even if main page is reloaded

thanks,
Alex
+Pie Number of slices to send: Send
The servlet container determines when a new session begins, so after you have created a "wait" attribute for the session, it won't go away until the servlet container decides that the session is over. Usually there is some time out period, or you can always close your browser and restart it...that usually does the trick.
Keep in mind that the Refresh header is not part of the official HTTP spec, so no browsers are *required* to support it, even though many do.

Other than these points, I wasn't clear on what your problem is. Are you trying to NOT get the message to display after the first time, or trying to get it to display the first time?
+Pie Number of slices to send: Send
I am trying to display message the first time.
+Pie Number of slices to send: Send
Also, I am using a DHTML layer that calls a JSP page that has all the waiting routines in it.
+Pie Number of slices to send: Send
Hi alex,
the first time the page is called it will not find the variable "wait" in the session hence the else part will be executed and hence the message dosent get displayed while when u go to the page the second time after searching the attribute is set in the session from the first time around hence the message gets displayed now.

what i suggest is u base the if condition on the result returned from ur search method call instead of some "wait" flag in session
something like this maybe u know better.
+Pie Number of slices to send: Send
 



<%
if(session.getAttribute("ResultSet") == null){
%>
Please wait, menus are being searched...
<%
}else{
//display data from database
}
%>
//where the ResultSet may be the actual result from database which can be set in the session...


But isn't this the same as creating some session variable and checking for its existance? Besides, I tried what you suggested with my current set-up and it seems that when I launch search the first time 'please wait...' does appear, but it just keeps looping infinately thru it without ever going into database fetch routine.
+Pie Number of slices to send: Send
Actually, this works:
I am going to test your electrical conductivity with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2155 times.
Similar Threads
out.flush()
Display error when record not found
'please wait' message while jsp is loading
character translation
'POST'ing parameters to another JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:49:37.