computergeek67
|
Disable Buttons On ClickSay that you have an email form on your site, but one of your users accidentally hits the button twice and, therefore, sends two emails. This tutorial will show how to stop that from happening.
Place this code between the "<head>" tags of your page:
| Code: | <script language=”JavaScript” type=”text/javascript”>
function dis(a){
a.disabled = “disabled”;
}
</script> |
Now for the button code:
| Code: | | <input type=”submit” value=”Submit” name=”B1″ onclick=”dis(this);”> |
The "onclick" statment is what does the trick here.
|