Help with form Submit

liunx

Guest
On a form, I need to be able to differentiate between someone hitting the "Enter" key, and someone clicking a submit button. This is to try to combat a natural inclination to hit Enter after filling in a textarea, and prematurely submitting the form.<br />
<br />
I've tried manipulating this.value with various combinations of onClick and onKeypress, but no luck so far.<br />
<br />
Is there any way this can be done?<!--content-->Keep in mind that some people do not use mouse and preventing form submission by disabling "Enter" key will make your form inaccessible.<br />
Your best choice is to simply verify that upon form submission each field has a value, regardless whether the form was submitted with "Enter" key or by clicking on "Submit" button.<!--content-->Well make sure you hotkey your submit button. I ddint think it did submit if the user was typing in a text area, I thought the defualt settings did not allow it, I have never seen it happen atleast. But I know I have made the revers so that when a user does hit enter it submits so I am sure their is a way to do the opposite, but this is something for the java script forum.<!--content-->
 
Back
Top