Handle it both in the front end and in the back end:

1) In Javascript on submit, change the submit button to read "Please wait..."
2) In Javascript on submit, check if the submit button is  already "Please wait..." or 
not
3) In CF, include in the form a hidden variable <input type=hidden name=transactionid 
value=#genuuid()#>
4) In CF, when handling the form action, check to make sure the transactionID is not 
already used

At 08:50 AM 12/19/00 -0700, Joe Sheble aka Wizaerd wrote:
>there are a couple of tags in Allaire's tag gallery that handle this, but 
>it relies all on java script.  On the onclick or onsubmit events, I set a 
>variable and then if the user clicks the button a second time, I evaluate 
>that variable, and if it's set I return false from the javascript function 
>that the onsubmit calls...
>
><form name="frm" action="index.cfm" onSubmit="return SomeFunc()">
>....
></form>
>
><script language="JavaScript">
>         var lSet = false;
>
>         function SomeFunc() {
>                 if( !lSet ) {
>                         lSet = true;
>                         return true;
>                 } else {
>                         return false;
>                 }
>         }
></script>
>
>At 10:01 AM 12/19/00 -0500, you wrote:
>>Add this to the input tag:
>>
>>onclick="return confirm('You better not dare click that button a second
>>time, OK?')"
>>
>>;-)
>>
>>I'm interested in an answer to this question as well.
>>
>>Matthieu
>>
>> > -----Original Message-----
>> > From: Jon Gage [mailto:[EMAIL PROTECTED]]
>> > Sent: Tuesday, December 19, 2000 9:57 AM
>> > To: CF-Talk
>> > Subject: Multiple submits
>> >
>> >
>> > Does anybody have any suggestions for preventing users from
>> > hitting a submit
>> > button multiple times?
>> >
>> > Thanks,
>> > Jon
>> >
>> >
>> >
>>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to