Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Html and keys shortcuts

Status
Not open for further replies.

kkarnez

IS-IT--Management
Mar 1, 2001
19
GR
Hello,
I am working on an intranet project and I would like to know the following:

Many of the users are used to dos apps and they don't use the mouse much. How can I add key shortcuts
functionality in this intranet's site?

thanks...
 
kkarnez try using the accelerator and accesskey properties for the element you are using... does the same job as keyboard shortcuts in Windows... applies in IE, but not sure about Netscape products .. if you are using Netscape...check it out first...cheers
 
What is the 'accelerator' and where can I find 'accesskey properties'?
 
You have to use "accesskey" attribute. It can apply to
these HTML tags:
Code:
A, AREA, BUTTON, INPUT, LABEL, LEGEND, TEXTAREA

Pressing an access key assigned to an element gives focus to the element. The action that occurs when an element receives focus depends on the element. For example, when a user activates a link defined by the A element, the user agent generally follows the link. When a user activates a radio button, the user agent changes the value of the radio button. When the user activates a text field, it allows input, etc.

Here is a sample from the spec:

This example assigns the access key "U" to a label associated with an INPUT control. Typing the access key gives focus to the label which in turn gives it to the associated control. The user may then enter text into the INPUT area.

Code:
<FORM action=&quot;...&quot; method=&quot;post&quot;>
<P>
<LABEL for=&quot;fuser&quot; accesskey=&quot;U&quot;>
User Name
</LABEL>
<INPUT type=&quot;text&quot; name=&quot;user&quot; id=&quot;fuser&quot;>
</P>
</FORM>

In this example, we assign an access key to a link defined by the A element. Typing this access key takes the user to another document, in this case, a table of contents.

Code:
<P><A accesskey=&quot;C&quot; 
      rel=&quot;contents&quot;
      href=&quot;[URL unfurl="true"]http://someplace.com/specification/contents.html&quot;>[/URL]
    Table of Contents</A>

I hope it helped. ---
---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top