Dave,
Validate the form before the final submit action.You could set the action='...' part of the form to run a javascript
function. In that function check to see if the required fields have been filled out. If not, set the focus on the appropriate empty field. If they
are all filled out, change the form.action property to your desired url and submit the form.
This way the form is checked if the user either hits enter or clicks the submit button.

Brian Mowers

At 01:27 PM 6/12/2002 -0400, you wrote:
<
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