• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Busy indicator in HTML

 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4481
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i withheld my reply because i had never done it before but that sounds right to me.
 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
Thanks a lot David, actually my application is a JSP/servlet only. This is really really useful for me.
Thanks again,
Appreciated.
Maya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic