Narendra
Narendra

Reputation: 3117

Set focus by using keyboard in asp.net

I am creating a login page and want to give user the flexibility to control the focus by using keyboard. I am using AccessKey but it seems not working. Any help will be appreciated.

Below is my HTML for Email field only.

<table>
    <tr>
      <td>
          <div class="loginLabel">
                <span class="emailPasswordText"><u>E</u>mail</span>
          </div>
          <asp:TextBox ID="txtUserName" runat="server"
               TabIndex="1" CssClass="inputCredential" MaxLength="60"
               AccessKey="E">
           </asp:TextBox>
      </td>
   </tr>
</table>

I tried by using Alt+E and Ctrl+E in Mozilla Firefox.

Upvotes: 2

Views: 2172

Answers (1)

mo.
mo.

Reputation: 4245

I believe in Firefox, access keys are used with Alt+Shift modifier keys. So if you press Alt+Shift+E you should get to you textbox.

http://en.wikipedia.org/wiki/Access_key

Opera has a cool feature where pressing Shift+Esc lists all available access keys on the page. It might help you in debugging.

Upvotes: 3

Related Questions