|
Mailing Lists
|
Home / Groups / ColdFusion Talk (CF-Talk)
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 |
May 23, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||