Forum Moderators: open
False - modern browsers (v3+) contain doubleclick protection. However, a user can click - wait a few seconds and click again before the previous page generates. So, you do need some sort of double click protection built in if it is a mission critical activity.
Lets try it right now, I'll hit submit, count to three, and click again (if I can).
Yes, absolutely! (If you only knew.) In fact, if you're going forms-to-database it's almost essential to trap this type of error or you'll soon end up with an unhealthy number of duplicate records in the file.
We use three error-trapping routines in the major form my site uses. #1 is a javascript that visually alters the Submit button when clicked. #2 compares IP numbers of the last 2 form users and stops them with an alert/error message if they are duplicates (the user can manually override, since there are some valid reasons to file a duplicate). #3 A timed minimum interval between submissions.
I used to have a problem where users would notice an error in the form after pressing SUBMIT, so they'd click STOP in their browser, fix the info, and then proceed.
By applying the previously mentioned tactics on the confirmation page, you leave room for less error.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
n=0
function test1(form) {
if (n==0) {
alert("Your from submitted!");
n++;
return true;
} else {
alert("Please wait for reply!");
return false;
}
}
// End -->
</script>
</head>
<body>
<form name=form action="" target=_blank onsubmit="return test1(this);">
<input type=text name=value1>
<input type=submit value=submit>
</form>
</body>
</html>