467,165 Members | 969 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,165 developers. It's quick & easy.

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.ManualPricing">
<table>
<tr><td>Please 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><input type="submit" name="Update Price Per Piece"
value="Update Price Per Piece"></td></tr>
</table>
</form>
Jul 20 '05 #1
  • viewed: 3581
Share:
1 Reply
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Eric | last post: by
6 posts views Thread by guoqi zheng | last post: by
6 posts views Thread by Paul Furman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.