Jeff,

The target is to define functional buttons because the staff used to such
combinations. There are not sumbit buttons in my application. It is
controlled by images. In whole it is necessary to create windows
interface which is usual with control buttons ( CTRL+S-save, CRTL-C -
copy, CTRL-F find e.t.c. ) for clients who used to old application.
Excuse me if something is not clear because I wanted to
underline  that I am not able to solve this problem by standard methods.
Your code is the best for me and can solve definitely my problem.
That's why, thank you very much.

Sergey,


> Mnemonics are onlly non-standard because most people don't use them!
> Our application uses them all over the place, and our users love us
> for it.  W3C accessibility guidelines strongly recommend heavy usage
> of mnemonics, also.

> That said, the standard modifier key for mnemonics is Alt, not Ctrl,
> and usually the mnemonic just puts focus on the element with the
> accessKey, it doesn't fire it.  I am also not sure what the accessKey
> on a form would do; it might just focus the first control in that form
> -- I doubt it would submit the form.  For a non-javascript approach,
> put the accessKey of 's' on your submit button:
>   <input type="submit" value="Submit" accessKey="s"/>

> Of course, this highlights a weakness of the <input type="submit"/> --
> there's no way to mark the 'S' as a mnemonic, because it's an
> attribute instead of element content.  If you only have one button in
> your form, you can try the following:

>   <button type="submit" accessKey="s"><u>S</u>ubmit</button>

> However, Internet Explorer's handling of the <BUTTON> element is
> broken; so if you want to perform any logic based on which of several
> buttons was pressed, you can't use <button type="submit"/>

> As Martin suggested, to get this to work with Ctrl+S instead of Alt+S,
> you'll need to use a JavaScript event handler.  I think you'll need to
> register the handler with the BODY element, though, not a BUTTON. We
> do something like the following:

> <script>
>   function init() {
>      body.onclick = doKey;
>   }

>   function doKey() {
>    var keyCode = (document.all) ? event.keyCode : event.which;
>     if (window.event.ctrlKey) {
>       if (keyCode == 83) {
>         // Ctrl+S was pressed
>       } else if (keyCode == 84) {
>         // Ctrl +T was pressed
>       } // and so on for all of our key handlers
>     }
>   }
> </script>

> On 7/18/05, Glen Mazza <[EMAIL PROTECTED]> wrote:
>> Still, mnemonics are non-standard for web applications, no?  This
>> doesn't seem right.
>> 
>> Glen
>> 
>> Niall Pemberton escribió:
>> > The short and not v.helpful response is you can't submit <html:form> - its
>> > just a JSP tag that renders a HTML <form> element and has nothing to do 
>> > with
>> > the submit process.
>> >
>> > Some of the Struts tags have the "accesskey" attribute which defines a key
>> > that can be used with the accelerator key (usually ALT) to invoke a form
>> > control. So if you use the struts submit tag you could do something like...
>> >
>> >   <html:submit accesskey="S"/>
>> >
>> > Niall
>> >
>> > ----- Original Message -----
>> > From: "Sergey Livanov" <[EMAIL PROTECTED]>
>> > Sent: Monday, July 18, 2005 8:36 PM
>> >
>> >
>> >
>> >>How can I submit html:form by pressing CTRL+S ?
>> >
>> >
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>>

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



-- 
regards,
 Sergey                          mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to