Re: Is, in a form, Enter a submit key?



Peter wrote on Wed, 1 Mar 2006 14:10:02 +0100:

I have on my website a long form: (in paper:) two pages, 50 fields, 10
text areas
Users may use Enter when filling a textarea, but if they use Enter in text
fields the form is submitted.
So in this form, restricting submit to a click on the submit button is
*not* stupid.

Indeed, that would be a good reason not to allow Enter.

The form action is post; is there a way to detect by scripting that the
Enter key is used.

There is, because I've seen it done. I can't remember the site, otherwise I
could have pasted the script from it for you.

Dan

(Because all my 80 forms always have a single, same-named submit button, I
tested the effect of an Enter:
apparently, if a form has one submit button, pressing Enter delivers the
name-value pair of that submit button!)

--
Peter J. Veger, Best Netherlands

"Daniel Crichton" <msnews@xxxxxxxxxxxxxxxxxx> wrote in message news:OuUrBESPGHA.456@xxxxxxxxxxxxxxxxxxxxxxx
Frank wrote on Wed, 1 Mar 2006 02:59:31 -0600:

"Peter J. Veger" <pjv365@xxxxxxxxxxxxxxxx> wrote in message
news:evFwWqPPGHA.3936@xxxxxxxxxxxxxxxxxxxx
Has entering the Enter key the same effect as clicking a Submit
button? Can this behavior be changed in some way?

Yes.
No, it can't be changed.
Use the Tab key.

I have to disagree here. It can be intercepted by using client side
scripting. I found a really stupid a week or so ago that popped up a
dialog saying "do not press enter, click on the submit button" every time
I pressed Enter after typing search words in the search field on their
form. With it being a one field form with one button it seems incredibly
short sighted to not allow someone to press Enter ...

Dan


.


Quantcast