I am creating a data entry form that includes a submit button that launches a script. This works great, but I would like to take an extra step.
In my experience with most web forms, the Enter key can be tied to a specific command, regardless of the location of the cursor on the form. I would like the input key to be bound to this Submit button. Then, no matter which field currently has focus, pressing Enter will send the script.
So, how do I bind the Enter key to the Submit button?
My best guess is to make an OnKeyPress event for every included text field. For obvious reasons, I hope that there will be a better way.
source share