Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop Cfloop From Running

Status
Not open for further replies.

fanghua

Programmer
Feb 11, 2004
28
US
Hi, I have this cfloop which contains some insert statement to SQL server. Problem is that user can click the botton twice to cause the cfloop to be run twice, which means duplicate records. I wonder if there is a way of stopping the first cfloop. or any other suggestion to fix this issue. thanks!
 
cfbreak will stop a loop you need some checking in there to see if it needs to stop though. java to disable the button after the first click is handy too.

 
you can put this in your submit button to keep them from clicking it twice:
onclick="this.disabled=true;"

thereptilian120x120.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top