JavaScript Source Code 3000: Buttons: Click to Submit
Click to Submit
(Best with IE) Prevent the Return key from accidentally submitting a form. The user now MUST click on the submit button. Alert messages do not appear in Netscape. Great!
(Note: Nothing will be sent to us by clicking this button)
JavaScript Source Code 3000: Buttons: Click to Submit Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!
<!-- TWO STEPS TO INSTALL CLICK TO SUBMIT:
1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<!-- Begin function onKeyPress () { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (keycode == 13) { alert("Please Click on the Submit button to send this"); return false } return true } document.onkeypress = onKeyPress; // End --> </script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->