Search HouseOfScripts.com

 

All Scripts        JavaScripts        ASP Scripts        Other Scripts

 

  Another Script to Disable Button after it was clicked asp, send, email, cdonts, link, recordset, hyper, hyperlink, create, list, box, dependant, dynamic

We all know that most of the people do double click when they press anything on the Internet. It cause double entries, multiple emails, etc... The following code prevents them from doing this. If you need to disable button and submit form at the same time, you can use How to disable button and submit form code.

As you can see, this code allows us to do disable any button - either Submit or Button.
If you need more buttons, just add onClick="DisabSub(this)"

<HTML>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">

function DisabSub(btn)
{
btn.disabled = true;
}

</SCRIPT>

</HEAD>
<BODY TEXT="000000" BGCOLOR="FFFFFF">

<FORM name="form1" method="post" action=""
enctype="text/plain">
<input type="submit" name="Submit" value="Submit" onClick="DisabSub(this)">
<input type="button" name="Button" value="Button" onClick="DisabSub(this)">
</FORM>

</BODY>
</HTML>

 

 


Home       Scripts       Active WebTools       Web Templates       Forum       Tools        Hosting       Questions/Comments       Add/Request