473,789 Members | 2,488 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hitting enter does not send key/value pair vrs. hitting button - help anyone?

Hi I have one text field and one submit button. If I hit the submit
button with a mouse the key/value pair key are properly submitted.
However, if I just hit the enter key the page does get submitted
however without the key/value pair of the submit button. I would
accept that a user must click the button to submit the pair, but none
of my other pages require that. It seems if I just hit the enter key
it defaults to hitting the submit key/value pair anyways. Any help?
Below if my code...
Thanks
<form action="/servlet/pricing.ManualP ricing">
<table>
<tr><td>Pleas e enter how much to increase the price by
percentage:</td>
<td><input type="text" name="percent"> </td>
</tr><tr><td>
(For example to raise the prices per piece by 30% enter '30')
</td><td>&nbsp;</td>
</tr>
<tr><td><inpu t type="submit" name="Update Price Per Piece"
value="Update Price Per Piece"></td></tr>
</table>
</form>
Jul 20 '05 #1
1 3810
ri******@yahoo. com (ritelman) wrote:
Hi I have one text field and one submit button. If I hit the submit
button with a mouse the key/value pair key are properly submitted.
However, if I just hit the enter key the page does get submitted
however without the key/value pair of the submit button.


This is browser-dependent, and you should not rely on any particular
behavior (key=value being or not being submitted, or a particular
key=value being submitted when there are several submit buttons).
For an explanation, see
http://ppewww.ph.gla.ac.uk/~flavell/...mquestion.html

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

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

Similar topics

2
6965
by: Chris | last post by:
Hello, I have an input box and a button and when the user clicks the button, the contents of the input box are placed on the page in list form. But, when the enter key is used it's as if the page is reloaded because the page is returned to its initial form with the list gone. I also have some hidden fields that I make visible, which are also returned to their hidden state. I'm hoping somebody can help me. <HTML> <HEAD>...
2
3811
by: | last post by:
I have built a login and regsitration system which works wel. However, one troubling occurs when a user does not click the 'logon' button but presses 'Enter' on his keyboard....when this happens the logon submit button is not triggered...does anyone know how to rectify this to cover both conditions? Thanks Jason
3
11681
by: Megha Vishwanath | last post by:
Hi, I have a struts form <html:form> in which although the focus rests on the submit button, hitting the enter key does not submit the form. I tried capturing the Enter key event and followed it by the document.form.submit() but this takes me through the validation attached with the submit twice( giving me all the alerts twice). Here's the code
5
2946
by: Eric | last post by:
Hi All, I'm very experienced in traditional ASP and am new to (am learning) ASP.NET. FYI: I am initially learning ASP.NET with VB.NET to ease the transition for me. I have encountered what I believe to be a huge limitation with ASP.NET and I'm wondering how you have handeled this problem. Let's suppose you have a page where the user can do one of two things: add a "Category", or add a "Movie Title" to an already existing category. ...
2
3119
by: 23s | last post by:
My site's login page has a form w/ 2 textboxes and a submit button. If I'm in either of those textboxes (i.e., either one of the textboxes has focus), in any given browser, hitting "enter" on my keyboard submits the form. Server side, I handle the click event of the submit button. This is the expected behavior, and this is the behavior irrespective of what browser I use on the login page. However... I have different page that is an...
6
3816
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many user get used to click "enter" key to submit a form. How can I use "enter" key to submit/postback in ASP.NET. Thank, Guoqi Zheng
11
7764
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and the web server performs a database query and displays the results. All of this works fine. I want the user to be able to press the Enter key while the cursor is still in SearchTextBox and have the SearchButton.Click event fire (thus performing...
6
4932
by: Paul Furman | last post by:
I'm getting incorrect response when hitting the enter key instead of actually clicking the button on a form. It activates but the post data isn't being sent I think. The php generated page flickers & reloads but doesn't perform the update. This is php generated, I'm just pasting the page source (reformatted & extra junk removed and I think they are now identical), and it's running on my localhost apache server for testing so maybe...
5
1669
by: id10t error | last post by:
I have a program where were are scanning bar codes for a scanner hooked up to a laptop via USB. The scanner adds the CRLF at the end of every scan. I need to figure out how to make the program to caputer the number scanned so i can use it in my program. Right now i have them scanning the item and then hitting a button on the form to enter the number and I want to make it so they do not have to hit the button. Can anyone help me on this.
0
10383
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
10178
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9971
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...
1
7521
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
6751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
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
5541
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3678
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2898
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.