At 03:34 PM 10/27/2003, you wrote:
On Tue, 2003-10-28 at 12:26, Bill Lunnon wrote:

> Don't know if this is complimentary to your workflow,
> try a javascript confirm (ie a client side pop-up, asking the user to click
> "Ok" to continue). This will catch any double clicks on the client side.


Unfortunatly I think our users would object to this solution.

On the client side, how about writing a doOnSubmit() javascript function that increments a counter for the number of times it's been called. If the function hasn't submitted the form (counter=0), submit it. If the counter>0, notify user of double submission.


Of course, if a user has multiple clients open with the same page open, this is no good (and you'd have to keep track on the server).

Server side, instead of putting a token in the session when the page is *served*, put a token in the session while the submission is being processed (use it like a semaphore). The token has a finite lifecycle (created on form submission, death on submission response served). There's no need to match tokens unless you're worried about something other than duplicate submission detection (such as security or time-based form relevance).

justin


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to