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
Solved

Form submitting and the enter key

Posted on 1998-06-27
7
177 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
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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 10 total points
ID: 1844428
Thanks, jbirk!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML - Color not displaying correctly in EMAIL. 6 49
Select case on click 3 19
How to check if a session is disconnected in php 9 31
html border input line 7 13
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

790 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