Asked by pkonstan1
at 2024-11-19 08:08:59
Point:150 Replies:3 POST_ID:828814USER_ID:11719
Topic:
JavaScript;Hypertext Markup Language (HTML);PHP Scripting Language
I have a very simple form that has both a "Submit" and "Cancel" button. (See below)..
It includes some javascript that runs when a person hits the "Submit" button.
But if a person enters the email and then hits the "Enter" key instead, the POST treats it as if the "Cancel" button was hit instead of the "Submit"
What do I need to do so that the default action for hitting the "enter" key is the "Submit" button and not the "Cancel" button.
It includes some javascript that runs when a person hits the "Submit" button.
But if a person enters the email and then hits the "Enter" key instead, the POST treats it as if the "Cancel" button was hit instead of the "Submit"
What do I need to do so that the default action for hitting the "enter" key is the "Submit" button and not the "Cancel" button.