Page 1 of 1

JavaScript accessKey property

Posted: Mon Aug 14, 2006 5:44 pm
by JellyFish
I need to know every way of use for the accessKey property of the textarea object. Little examples here and there and some good description of what it's used for.

Thanks for read. All posts, examples and help is appreciated. :D

Posted: Mon Aug 14, 2006 5:55 pm
by feyd
Like all the other access key properties of the other form elements, it brings focus to itself (or in the case of buttons, clicks them) .. last I checked.

Posted: Mon Aug 14, 2006 6:09 pm
by JellyFish
I don't understand? You mean the accessKey brings focus to that form element? Like the Focus() method? Give me an example of what you mean, as I don't know. :D

Posted: Mon Aug 14, 2006 6:13 pm
by feyd
In the posting page, roll your mouse over the various buttons. Most of them have access keys set and will respond (simulating a click) when it is pressed.

Posted: Mon Aug 14, 2006 6:14 pm
by MarK (CZ)

Code: Select all

<textarea accesskey='a' id='tarea1'></textarea>
<textarea accesskey='b' id='tarea2'></textarea>
<textarea accesskey='c' id='tarea3'></textarea>
Now try hitting [Alt]+[A], [Alt]+, [Alt]+[C] and see what happens ;)

Posted: Mon Aug 14, 2006 6:23 pm
by JellyFish
Maybe I'd understand more if I had an example of what it's used for? :?

Posted: Mon Aug 14, 2006 6:24 pm
by jayshields
Like feyd said, click new post, and for example, press alt+b.

Posted: Mon Aug 14, 2006 6:29 pm
by JellyFish
Oh I see. You use the accessKey atribute to set the "accessKey" which is the key that you need to access the form element. So if you set the attribute to "a" then you'd have to press alt+a to set focus to the element?

Posted: Mon Aug 14, 2006 6:30 pm
by jayshields
yes

Posted: Mon Aug 14, 2006 6:55 pm
by JellyFish
Okay well, thanks all.