I have a form
with two text boxes, one select drop down and one radio button. When the enter key is pressed, I want to call a javascript function (User defined), but when I press it, the form is submitted.
How do I prevent the form
from being submitted when the enter key is pressed?
Detect Enter key pressed on whole document:
http://jsfiddle.net/umerqureshi/dcjsa08n/3/
If you're using jQuery: