By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.