Just to augment Larry's suggestion, when you go to actually input the record 
into the database, it might not be a bad idea to incorporate some sort of 
duplicate check here as well.

The easiest way to do this is to enforce unique key constraints in the 
database, then code using TRY/CATCH to trap for this error.  A less 
desirable method would be to run a query first to see if the record about to 
be submitted looks like a duplicate.


>> Gang,
>>
>> I am occasionally getting duplicate records in my database. I think it
>> is coming from people hitting �?oSubmit�?� twice when the server is slow.
>> How do you guys prevent this?
>>
>> I tried some JavaScript code to disable the button, which did gray-out
>> the button, but then did not pass the Button info along to Cold Fusion.
>>
>
> Jeff,
>
> Her's what I use, while not a complete solution, it works for most 
> browsers if Javascript is turned on:
>
> <input type="button" value="Update Cart" onClick="if(this.value == 'Update 
> Cart') this.form.submit(); this.value = 'Please Wait';">
>
> This button will only submit the form if the displayed value is "Update 
> Cart".
>
> hth,
> larry
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201586
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to