473,788 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pressing enter to submit form

Hi. I have a user who wants his form submitted when he presses [Enter].
Is it possible? If so, how?
Oct 13 '05 #1
5 2787
Dennis Allen wrote:
Hi. I have a user who wants his form submitted when he presses [Enter].
Is it possible? If so, how?

That is the default behaviour for forms with a submit button in both IE
and Firefox (and by extension I guess, without testing, Mozilla et al).

Do you have a particular browser that doesn't do it? From memory, old
Netscape only submitted if the submit button was in focus.

--
Rob
Oct 13 '05 #2
I think it is the norm for [Enter] to submit the form. Check that there
are no JS errors or too much complexity in the form if it does not
work,

Here is form wth multiple text fields that I made which submits fine on
the [Enter]

http://hotelbuysell.com/Add_Seller.php

so look at the code - its ordinary with some js validation of the
fields

Kitty
OpenSkyWebDesig n.com

Oct 13 '05 #3
??? On most forms, I've alway had click the submit button with the mouse
cursor. Never could seem to [Tab] to one so I could hit [enter].

He wants [Enter] to submit the form, regardless of which input field he
is on...Dennis

"RobG" <rg***@iinet.ne t.au> wrote in message
news:PG******** *********@news. optus.net.au...
Dennis Allen wrote:
Hi. I have a user who wants his form submitted when he presses
[Enter]. Is it possible? If so, how?

That is the default behaviour for forms with a submit button in both
IE and Firefox (and by extension I guess, without testing, Mozilla et
al).

Do you have a particular browser that doesn't do it? From memory, old
Netscape only submitted if the submit button was in focus.

--
Rob

Oct 13 '05 #4
??? On most forms, I've alway had click the submit button with the mouse
cursor. Never could seem to [Tab] to one so I could hit [enter].

He wants [Enter] to submit the form, regardless of which input field he
is on...Dennis

"MsKitty" <Ki**********@g mail.com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
I think it is the norm for [Enter] to submit the form. Check that there
are no JS errors or too much complexity in the form if it does not
work,

Here is form wth multiple text fields that I made which submits fine
on
the [Enter]

http://hotelbuysell.com/Add_Seller.php

so look at the code - its ordinary with some js validation of the
fields

Kitty
OpenSkyWebDesig n.com

Oct 13 '05 #5
Dennis Allen wrote:
??? On most forms, I've alway had click the submit button with the mouse
cursor. Never could seem to [Tab] to one so I could hit [enter].

He wants [Enter] to submit the form, regardless of which input field he
is on...[...]
As Rob wrote correctly, the latter is the default behavior in all recent
browsers. Without answering the questions that might clarify this, it
is unlikely someone here is able to help you, let alone going to do so.
[Duplicate top post]


Please read and take heed of <http://jibbering.com/faq/> before posting.
PointedEars
--
But he had not that supreme gift of the
artist, the knowledge of when to stop.
-- Sherlock Holmes
Oct 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3197
by: T.E. | last post by:
Hi all, I'm a newbie in php. I encounter a problem with php form that has only one textfield. If I click on the submit button, the form works fine. However, when I press 'enter', the form doesn't work right. After comparing that form with other forms, I noticed the problem
4
12732
by: Jerry | last post by:
Hello I have some textboxes (input type=Text) in a Form. In some Forms if I Press Enter while I am in the Textbox It causes a Submit. The input type is text not submit. It's obsure that the effect is only on some webform's not in all.
2
7215
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a server side textbox control to do something - eg change the words on label - when the key pressed is the "enter" key. I can see the label change to what i expect ----- BUT .... then the
3
2984
by: yuelinniao | last post by:
hi, I have got a simple way to make "textarea" support "auto-submit" when pressing Ctrl+Enter, and tested under both IE and Firefox. The common old method is like this: <form name=form2> <textarea onkeydown='if(event.keyCode==13 && event.ctrlKey) return document.form2.submit()'> </textarea> </form>
1
2374
by: laredotornado | last post by:
Hi, I have a very simple form and I would like on Firefox and IE for the form to submit upon the user pressing enter in the textfield. Right now, I have <script type="text/javascript"> function search() { var search = document.getElementById('Search'); location = "search_response.php?Search=" + escape(search.value);
4
3882
by: roxanaislam | last post by:
Submitting Form by pressing the "ENTER" key -------------------------------------------------------------------------------- Hi: I have a search form in my application which has 4 dropdown list controls, one text box, one "GO" button, one "reset" button. When the "GO" button is clicked the form gets submitted and the results page is displayed. When I press the "enter" key nothing happens. I want to submit the form by pressing the "enter"...
4
7630
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches. Recently somebody pointed out to me that you can't just press ENTER anymore after typing in the TextBox but that you HAVE to click on the submit Button WITH THE MOUSE for it to work. After some initial troubleshooting I discovered that it's only...
3
3309
by: Jake Barnes | last post by:
I'm researching the Enter key. This is for an Ajax chat application. The designer tells me that she wants people to be able to submit text simply by hitting the Enter key. She wants this to happen even if people still have the cursor inside the textarea where they have just been typing. I started researching this and came upon this post by Michael Winter, from 2004: ...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.