File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

time to wait before next submission

 
nathan sullivan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

how can I implement a feature on the server side where after a user clicks submit for the first time, clicking submit again will bring the user to a page showing "Please wait X seconds to submit". I've seen this feature on several sites but can't resources on it.

Thanks.
 
Paul Clapham
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the user clicks submit, store the current time in the user's session. The next time they click submit, compare the current time to the time last stored in the session. If the difference is less than X seconds, redirect to the page which tells them to wait.
 
Piyush Mangal
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can show a div with a Waiting GIF image on page submit. As soon as response from the server comes , browser will display the next page.
 
nathan sullivan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. Can this be all done in the servlet or must I use some listener?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic