I agree with just about everything Isaac said, but wanted to chime in and
say that the easiest solution would be the <cflocation> on the form's action
page.  This is generally how I prevent the duplicate submissions.

The form's action page contains no HTML, just the insert query.  After the
query successfully runs, I do a <cflocation> to a "Thank You" page.  This
way, a refresh only refreshes that page.



----- Original Message -----
From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 12:34 PM
Subject: Re: Prevent Refresh


> > What is best way of preventing multiple entries in DB
> > through form
> > submission when user clicks on REFRESH or BACK button of
> > browser?
>
> > Thanks
> > Shaz
>
> I usually use cflocation to move the browser to a confirmation template
which informs the user that the record has been updated.
>
> In my case, this is often the form page, or in other words, they go back
to the form with a "information saved" confirmation message at the top of
the form, usually with all the info they just enterred filled in on the form
again. I also like to use the pengoworks qForms API (www.pengoworks.com) to
prevent multiple form submissions in browsers that support the DOM. If I
have to use cfflush on a page,
>
> I move from cflocation to the javascript location.replace() which does the
same thing client-side by replacing the current address in the browser
history. It's available in Netscape as far back as version 3 and IE
similarly. I'm not certain about other browsers, although I would assume at
least Mozilla supports it since it was implemented in NS prior to Mozilla
becoming available. There's a UDF implementation of it in the Tapestry API
in my sig file also.
>
> hth
>
> s. isaac dealey                972-490-6624
>
> new epoch                      http://www.turnkey.to
>
> lead architect, tapestry cms   http://products.turnkey.to
>
> tapestry api is opensource     http://www.turnkey.to/tapi
>
> certified advanced coldfusion 5 developer
> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to