Can I trigger button actions from the keyboard?
1 posts in topic
Flat View  Flat View

Posted By:   John_Thompson
Posted On:   Friday, January 18, 2002 04:07 PM

I have a struts form with several action buttons such as FIND, ADD, and DELETE. Is there any way to trigger those actions with keystrokes (for example, cause alt-d to trigger the DELETE action)?

Re: Can I trigger button actions from the keyboard?

Posted By:   Ted_Husted  
Posted On:   Sunday, January 20, 2002 04:34 AM

The Struts form tags all accept an "accesskey" property,
which lets you set this value. So "accesskey='D'" will
cause IE to select the field or button when the alt-d
(or equivalent) key is pressed.

This is part of the official HTML specification, but is not
supported by all browsers. It is also problematic in a
internationalized application, since there isn't an
easy way to localized the accesskeys using the Struts

HTH - Ted

About | Sitemap | Contact