JavaScript accessKey property

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

JavaScript accessKey property

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post 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 ;)
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Maybe I'd understand more if I had an example of what it's used for? :?
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Like feyd said, click new post, and for example, press alt+b.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post 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?
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

yes
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Okay well, thanks all.
Post Reply