File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes clicking submit button multiple times Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "clicking submit button multiple times" Watch "clicking submit button multiple times" New topic
Author

clicking submit button multiple times

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Hi All,

I have to slove one scenario, the user is doing money transaction from one account to another account he entered some amount to transfer from first account to secone account and he clicked submit button, assume my application is taking ten seconds time to do that particular transaction, user don't know about this time taking process to finish his transaction he thought I am not clicked properly so he clicked submit button second time.

here I need to display message to user (Ex: your transaction is in process), how can I solve this problem

I think one solution is: after clicking submit button(first time) I can disable that button till to finish that transaction. but here I don't want to disable.

regards,
vardhan
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 688

Hi,

There are so many ways you can prevent by user to multiple submitting. That is depend on you. I have give some explanation what i think at right now in my mind.

1 ) Make one session variable which contains just any value when you first time submit process transaction set that session variable null. Now at your process transaction business logic page check if that session variable contains value null do not process ahead.

2 ) You can make your button disable when process transaction.

3 ) See link http://jquery.com/demo/thickbox/ which is example of thick box. you can add something like this when you process transaction and just see process images using thick box...


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
nishan,

thanks for your reply,

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clicking submit button multiple times