One way this can be solved is use a synchronized token to manage the
submittal (Synchronizer Token, Core J2EE Patterns).  The way this works
is you create a unique token, for example a UUID and store this in the
user's session.  When the user reaches your form you store the token in
a hidden input field.  On the processing page you check if the tokens
match and if so begin validating the data.  If any data validation fails
return them to the form to correct the problem.  If the data validation
passes, create a new token for the user and overwrite the one in the
session.  If the user presses the back button and resubmits, the tokens
do not match and you can alert the users of the problem.

HTH,

Rich Kroll



This communication is intended for use only by the individual(s) to whom
it is specifically addressed and should not be read by, or delivered to,
any other person.  Such communication may contain privileged or
confidential information.  If you have received this message in error,
please notify us immediately by returning the communication to the
sender, or by sending it to [EMAIL PROTECTED]

> -----Original Message-----
> From: Doug Brown [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 28, 2006 8:16 AM
> To: CF-Talk
> Subject: Re: <cfinput validate="SubmitOnce">
> 
> Well, I think I have gone and described the problem wrong. It is not
the
> fact that the user can click the submit button twice, as much as that
they
> can click back and submit again. If I expire the page after the form
> submittal, it poses another problem with server side validation. If
they
> are
> directed to click back to fix the form items that were required they
get a
> page has expired. What is the solution to this?
> 
> 
> 
> Doug
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261849
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to