Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 08:18 PM
ritelman
Guest
 
Posts: n/a
Default 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>
  #2  
Old July 20th, 2005, 08:18 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: hitting enter does not send key/value pair vrs. hitting button - help anyone?

ritelman@yahoo.com (ritelman) wrote:
[color=blue]
> 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.[/color]

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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles