You are here: irt.org | FAQ | JavaScript | Form | Q1509 [ previous next ]
Try the following in an HTML 4.x browser:
<form name="myForm"> <input type="button" name="myButton" onClick="if (!this.disabled) someFunction()"> <input type="submit" name="mySubmit" onClick="return (!this.disabled)"> </form> <script language="JavaScript"><!-- document.myForm.myButton.disabled=true; document.myForm.mySubmit.disabled=true; //--></script>