> Gang, > > I am occasionally getting duplicate records in my database. I think it > is coming from people hitting “Submit” 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201581 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

