File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Busy indicator in HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Busy indicator in HTML" Watch "Busy indicator in HTML" New topic
Author

Busy indicator in HTML

Shreya Menon
Ranch Hand

Joined: Jul 31, 2001
Posts: 285
Hi all.
I do have a HTML/jsp page which does quite a few database calls. So it will take some time to go to the database, do some validation routine and return back.
At this time I want to put an image in my page, which shows that the value is being processed.
How can I integrate this or how will I implement this functionality ?
This image has to be loaded once I send data to the database and it has to stand over my HTML page till the new page with the results are loaded.
How can I do this ?
Please help
Thanks,
Maya
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Usually I've seen this done by using TWO HTML pages.
The following is a SErvlet/JSP solution, I don't believe there is a pure HTML/JavaScript solution.
User has a screen where they enter a bunch of data then hit a button to start the DB search.
Request is sent to back end (don't search yet), build a nice "Please Wait" page to send back that includes another HTML form, same as the first, but with all of the data as hidden fields.
Get this form to auto-submit (ie form submits as soon as the page loads) and return the db search from this.
Now the user gets to see the "Please Wait" sign during the time the second request takes to return.
Is this what you were looking for?
Dave.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i withheld my reply because i had never done it before but that sounds right to me.


SCJP
Visit my download page
Shreya Menon
Ranch Hand

Joined: Jul 31, 2001
Posts: 285
Hi David,
Thanks for the resppnse. This is exactly what I am looking for.
I haven;t done this before. So if you have a code, could you please send it to
google_n@hotmail.com ?
Thanks so much.
Maya
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Once again, this is a JSP/Servlet based solution, but that's the way I do it...

Start form --> Temp Servlet --> Please Wait page --> Processing Servlet
rather than
Start form --> Processing Servlet
Dave.
Shreya Menon
Ranch Hand

Joined: Jul 31, 2001
Posts: 285
Dave,
Thanks a lot David, actually my application is a JSP/servlet only. This is really really useful for me.
Thanks again,
Appreciated.
Maya
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Busy indicator in HTML