Solved

Enabling "Enter"

Posted on 1998-09-04
4
155 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
[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
  • 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

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!

Question has a verified solution.

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

Suggested Solutions

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…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

749 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