You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Billy Ng <kw...@earthlink.net> on 2003/04/08 18:27:31 UTC

How to control Enter key

Hi folks,

Please bear with me if you think this is a HTML questiom.  I want to control the Action to run a method if user hits the Enter key from the form.  All the buttons in the form are input image (<html:image> tag).  If the user does not user the mouse to click on the button, instead, the user press the Enter key.  How can I tell it is from the Enter key in the Action?

Thanks!

Billy Ng

RE: How to control Enter key

Posted by Michael Marrotte <ma...@nicusa.com>.
Maybe try hiding the default control that submits the form and name it
something other than the image button.

--Michael Marrotte

-----Original Message-----
From: Billy Ng [mailto:kwokng@earthlink.net]
Sent: Tuesday, April 08, 2003 12:28 PM
To: Struts Users Mailing List
Subject: How to control Enter key


Hi folks,

Please bear with me if you think this is a HTML questiom.  I want to control
the Action to run a method if user hits the Enter key from the form.  All
the buttons in the form are input image (<html:image> tag).  If the user
does not user the mouse to click on the button, instead, the user press the
Enter key.  How can I tell it is from the Enter key in the Action?

Thanks!

Billy Ng


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org