> 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.

> Thanks for you help, Jeff


Well the simplest solution looks like this:

<script language="JavaScript">
        function submitForm(frm) {
                if (typeof frm._submitted == "undefined")
                { frm._submitted = true; return true; }
                else { return false; }
        }
</script>

<form onsubmit="return submitForm(this);">

qForms and the onTap framework both have some more sophisticated
solutions which ultimately use the same technique.

hth

s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://macromedia.breezecentral.com/p49777853/
http://www.sys-con.com/author/?id=4806
http://www.fusiontap.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:201400
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