Here is something I use, you can omit the alert to make it transparent to the user.
 
 
<!-- 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 NEXT button to process this form.");
return false
}
return true
}
document.>//  End -->
 
 
===========================================================
Confidentiality Notice
This message is intended exclusively for the individual or entity to which
it is addressed. This communication may contain information that is
proprietary, privileged, or confidential or that is otherwise legally
protected from disclosure. If you are not the named addressee, you are not
authorized to read, print, retain, copy or disseminate this message or any
part of it. If you have received this message in error, please notify the
sender immediately by e-mail and delete all copies of the message.
===========================================================
----- Original Message -----
Sent: Wednesday, June 12, 2002 10:27 AM
Subject: Witango-Talk: Enter submits form

I don't recall if this has been discussed before, but in IE pressing the Enter key will submit a form. Is there an easy way to prevent this from happening?
 
Maybe an onSubmit handler to check the last key pressed or button clicked and the type of the object in focus and return false if the Enter key was pressed on anything other than a submit button. How would you get the last keystroke of click value?
 
Thanks.
Dave Shelley

Reply via email to