CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Disabling Submit (prevent multiple submits)

Print topic Send  topic

Author Message
E43509

Posts: 283
Posted: 04/15/2005, 5:51 AM

I've searched the forums and have not seen a working answer on how to prevent multiple submits. When any solution proposed was implemented, it caused updates or ... to no longer work. Has anyone resolved this? I use the code below to disable submit. The submit button disables but no insert or updates or deletes work


<SCRIPT LANGUAGE="JavaScript">
<!-- Web Site: http://dynamicdrive.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function disableForm(theform) {
if (document.all || document.getElementById) {
for (i = 0; i < theform.length; i++) {
var tempobj = theform.elements;
if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
tempobj.disabled = true;
}
setTimeout('alert("Your form has been submitted. Notice how the submit and reset buttons were disabled upon submission.")', 2000);
return true;
}
else {
alert("The form has been submitted. But, since you're not using IE 4+ or NS 6, the submit button was not disabled on form submission.");
return false;
}
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<form onSubmit="return disableForm(this);">
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.