> What's a good way to prevent a user from running a cfm program over 
> and over if they click a submit button multiple times? For example. a 
> user clicks a submit button for the first time. CFM runs. Then, before 
> it finishes, they click the submit button again. Apart from a cfflush 
> and a please wait message, are there other options to prevent the cfm 
> from running multiple instances? Many thanks! 

try this instead of your submit button:
<INPUT TYPE="Button" VALUE="Submit" onClick="if(this.value == 'Submit') 
{this.value = 'Please Wait.';this.disabled=true;this.form.submit();}" />

If you're running CF7 or later and CFForm, you can also use 
<cfinput name="whatever" type="submit" validate="SubmitOnce" />

Fair warning, both of these methods require that the user has JavaScript 
activated.

hth,

larry 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306163
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