P
Peter J. Veger
Has entering the Enter key the same effect as clicking a Submit button?
Can this behavior be changed in some way?
Can this behavior be changed in some way?
Peter J. Veger said: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.
Peter J. Veger said:Thank you.
I have used
<input type="button" onclick="submitForm(event);" />
with
function submitForm(anEvent){((anEvent.target) ? anEvent.target :
anEvent.srcElement).form.submit();}
because I did want to add an image.
--
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.
The form action is post; is there a way to detect by scripting that the
Enter key is used.