Just wondering if ColdFusion has anything to prevent form submission twice when user doubleclicks the submit button. I know Javascript can do the work. But I want to know if there is any server sider solution for this. Thanks.
I usually have a session marker variable set. When the user hits Submit, the action template checks for the existence of the variable, and then whacks the variable. Subsequent calls to the action template won't find the session variable, so the database action doesn't take place, and the user is redirected to a "Sorry, you already did this" page.
Thank Phil. I tried the session variable control. It works for click twice with an interval, but when I doubleclick, the action page is still executed twice. I guess the session control on the server is not fast enough to capture the doubleclick and stop the second form submission?
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. -Douglas Adams (1959-2001)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.