RE: duplicate records inserted
One way is to disable the submit button once it is pressed. There is a JS function for it. Try googling for it -Original Message- From: Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 9:49 AM To: CF-Talk Subject: duplicate records inserted Hi. I have a form where on submit multiple lines of data are inserted into the database. However, as the page is still processing, If the user re-clicks the submit button again, it ends up adding much more number of records than originally intended. We end up with duplicate records. Can I use cftransaction for this? Can someone explain with an example please? Thanks a bunch. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250718 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: duplicate records inserted
Well. you dont need cftransaction, just do a onSubmit event for the form that disables the submit button, that should help it out MD On 8/23/06, Ken [EMAIL PROTECTED] wrote: Hi. I have a form where on submit multiple lines of data are inserted into the database. However, as the page is still processing, If the user re-clicks the submit button again, it ends up adding much more number of records than originally intended. We end up with duplicate records. Can I use cftransaction for this? Can someone explain with an example please? Thanks a bunch. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250720 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: duplicate records inserted
You can disable the submit button via javascript, or have a gateway page inbetween the form and the action page so that they cannot submit more than once. Snake -Original Message- From: Ken [mailto:[EMAIL PROTECTED] Sent: 23 August 2006 14:49 To: CF-Talk Subject: duplicate records inserted Hi. I have a form where on submit multiple lines of data are inserted into the database. However, as the page is still processing, If the user re-clicks the submit button again, it ends up adding much more number of records than originally intended. We end up with duplicate records. Can I use cftransaction for this? Can someone explain with an example please? Thanks a bunch. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250719 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: duplicate records inserted
The client could disable JS and still get around it Adkins, Randy wrote: One way is to disable the submit button once it is pressed. There is a JS function for it. Try googling for it -Original Message- From: Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 9:49 AM To: CF-Talk Subject: duplicate records inserted Hi. I have a form where on submit multiple lines of data are inserted into the database. However, as the page is still processing, If the user re-clicks the submit button again, it ends up adding much more number of records than originally intended. We end up with duplicate records. Can I use cftransaction for this? Can someone explain with an example please? Thanks a bunch. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250721 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: duplicate records inserted
Honestly who disables javascript? I think catching the majority of people who don't disable would be good enough. And what you do is simply put an onclick attribute on the submit button that says onclick=this.disabled=true or onclick=this.style.display: none Daniel Baughman -Original Message- From: Jake Churchill [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 8:05 AM To: CF-Talk Subject: Re: duplicate records inserted The client could disable JS and still get around it Adkins, Randy wrote: One way is to disable the submit button once it is pressed. There is a JS function for it. Try googling for it -Original Message- From: Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 9:49 AM To: CF-Talk Subject: duplicate records inserted Hi. I have a form where on submit multiple lines of data are inserted into the database. However, as the page is still processing, If the user re-clicks the submit button again, it ends up adding much more number of records than originally intended. We end up with duplicate records. Can I use cftransaction for this? Can someone explain with an example please? Thanks a bunch. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250729 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4