File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Avoiding multiple request at a time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Avoiding multiple request at a time" Watch "Avoiding multiple request at a time" New topic

Avoiding multiple request at a time

Selva Varadhan

Joined: Aug 20, 2005
Posts: 14

Scenario :
In my application, i have the page, contains two buttons like Previous and Next button.

User Action:

[1] User clicks Next button (Submit Action )
[2] Before the response reached the Browser, user clicks previous button.

Issue :
This kind of action some time leads to inconsistant stage.
How to handle the user action, when one request is in processing stage.I don't want to disable the button.

Plz proivde some solution to handle this situation

Selva varadhan
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
You can put a js code to detect the second mouse click and prevent the event from taking place and put an alert which says that there is a request already in process.
I agree. Here's the link:
subject: Avoiding multiple request at a time
jQuery in Action, 3rd edition