Solved

Enabling "Enter"

Posted on 1998-09-04
4
149 Views
Last Modified: 2010-04-09
I have a form in Netscape, that I would like to have submitted when the user hits the "Enter key".  This seems to work by default in IE, but how do you make it work for Netscape?
0
Comment
Question by:IsleOfView
  • 2
4 Comments
 
LVL 1

Expert Comment

by:nchalasa062698
ID: 1837361
Are you calling a javascript function to submit the form , if so using the
onsubmit event handler in the FORM tag will  submit the form when you press enter
in Netscape.

<FORM ACTION=" " METHOD="POST" OnSubmit="jv_ function()".
0
 

Author Comment

by:IsleOfView
ID: 1837362
I'm not using a javascript function at the moment.  It is just straight HTML submitting information to a CGI script.
0
 
LVL 8

Accepted Solution

by:
jbirk earned 20 total points
ID: 1837363
What causes the forms to submit automatically is the fields which are in the form and the field which is currently focused.  If there is only one text field, it will automatically submit on enter, but if there are more than one text field it will never automatically submit.  Then the field which is in focus determines whether or not it will submitted if there is only one text field.  This unfortunately differs with EVERY browser.  IE allows it in more different kinds of fields than Netscape does.

Now in order to ensure that pressing enter will submit the form, the only thing I can think of is to write javascript to trap the keypressed event, and if it is enter submit the form via javascript.  This is 4+ browsers only and can get complex because  netscape and IE have totally different incompatible event handling models.

Good luck!
-Josh
0
 

Author Comment

by:IsleOfView
ID: 1837364
Thanks....that's what I needed to know!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now