Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dispaly "Saving please wait" message when submitting the form

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am developing a from in which when the user submit the form ( using command button or command link) it should save the contents into the database , while the user waiting for saving into the database , i just want to show him something like Saving please wait ( of course all the elements in the form should be disabled during the waiting )..


is there any way to do that ..
 
Anjali Raman
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure if this working perfectly fine as your requirement, but you could try this java script in your JSP:



This should give you the message and will also disable the contents on the page.
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks alot for your reply ,

I have tested it , it seems something acceptable but I have to end the waiting once the saving to the database is over ..

how I do perform that
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Any reply ............
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any reply ...................
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Bumping" is not encouraged on the JavaRanch. If you don't get an answer fairly quickly (meaning a few days, not a few minutes, since we don't get paid for this), it's usually because no one else knows either.

Your biggest problem has to do with the atomic nature of HTTP. When you click a submit button, you can't do anything else but wait for a new page view to be returned to you. You can't pop up one of the stock JavaScript dialogs, because they're modal and will "hang" the submit until the user dismisses them.

You can pop open a new browser window, but that kind of behavior really annoys some of us. You could simply modify the page view prior to actually submitting to display the message on the page body. Which goes something like this:



 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a couple of other ways I can think of where you could end the waiting message.

You could reload the page they are on to erase the message.

Or you could can do this using "Direct Web Remoting". I have an application where I do some processing that can take anywhere from 45
minutes to 2 hours. I use DWR to display a progress message so the user can see that something is actually happening on
the server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic