Tom,
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.

Hope this helps

Bill

-----Original Message-----
From: Tom Parker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 28 October 2003 10:18 AM
To: [EMAIL PROTECTED]
Subject: Form Double Submit Detection


I've designed my workflows so that they do not need to store anything in
the user's session. This allows the user to conduct more than one
instance of a particular task at the same time without data getting
mixed up. However this presents me with a problem if the user double
clicks the submit button and causes the server to do something twice.

The normal(?) way of detecting this would be to store a unique token in
the session and in the form, and compare them to ensure that the user
has not submitted this form twice. For this to work, you need to store
something in the session for each possible form submission. If the user
never submits the form, then the token will hang around for the life of
the session as we don't know that the user won't submit the form
someday.

Currently I'm thinking of allowing the user to store a finite number of
duplicate check tokens, or to make the tokens expire after an amount of
time. The former doesn't seem very attractive (load a record, view a
bunch of other records such that the first record's token is dropped,
save the first record - no token found), while the latter could lead to
rather a lot of tokens being stored.

Is there a solution to this problem that I'm missing?


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



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

Reply via email to