Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Form submitting and the enter key

Posted on 1998-06-27
7
Medium Priority
?
183 Views
Last Modified: 2010-04-09
I was just wondering why sometimes when  you hit enter on a form, it submits it, and other times it doesn't (plays an error sound or something like that).  Also if something in the form causes this, is it the same on all the browsers, or are there different behaviors for the different browsers as well (and what are they).
0
Comment
Question by:jbirk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1844422
The enter key submits the form when there is only one textfield (and a submit button), in other cases it plays the error sound.


0
 
LVL 8

Author Comment

by:jbirk
ID: 1844423
That's not right...  focus on the text field on this page which says "increase points to:"
Then hit enter.  On Netscape 3 and 4, it submits the form, and there are 4 fields for this form.

On IE 4, it also submits on the text field AND the checkbox field (below) when hitting enter (after focusing on those fields).
0
 
LVL 6

Expert Comment

by:alamo
ID: 1844424
sybe had it right, sort of. Netscape blocks Enter as Submit if there if multiple *text* fields.What matters to Netscape on the page you mention is there is only one text field - none of the other fields are <input type=text> fields. (The comment area is a textarea).

There is no official "standard" on this, it is purely up to the browser designer. Other browsers like IE do it a little differently, as you observed. I think the general idea is to make it easier for people to submit yet to keep them from accidentally submitting before they are done filling out the form.

I wouldn't be surprised if some beta tester back in the pre-Netscape days of Mosaic had submitted feedback that led to this feature, and it has lived on, being tweaked periodically by browser designers trying to make it more useful.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:jbirk
ID: 1844425
Thank you Alamo.  Answer the question, and I'll give you the points.
0
 
LVL 2

Expert Comment

by:ndnet
ID: 1844426
The error sounds on IE4 on NT. Not on 95/98. No matter what the form is.

As for Netscape, Alamo is right.
0
 
LVL 8

Author Comment

by:jbirk
ID: 1844427
I had intended for alamo to get the points (few though they may be).  Besides, what I wanted was info about when hitting enter works, not when it makes an error sound.  Alamo answered that for me.

Please answer the question alamo.
0
 
LVL 6

Accepted Solution

by:
alamo earned 40 total points
ID: 1844428
Thanks, jbirk!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question