How to prevent hitting "Enter" from submitting...
Posted on 1999-07-15
Good [insert appropriate time here]!
I have the following problem:
I have to create a dialogue where the users have to enter an ID, a password and then have to chose one of 2 things, like yes or no.
Now, setting it up is easy: 1 textarea, 1 password-thingy on yes and on no button.
But, if you entered your password and hit enter, you always send the thing with "yes" (yes is the first button).
This should not happen. Enter should not be the same as pushing no, either (or neither (?)). So how can I prevent hitting Enter from submitting the form?
Thanks in advance.