Tabbing between text inputs with other tags between them

Discussion in 'HTML' started by Thierry Lam, May 1, 2009.

  1. Thierry Lam

    Thierry Lam Guest

    I currently have the following html:

    <label for="Name">Name:</label>
    <input type="text" value="" name="name" id="name" />
    <a href="name">*</a>
    <br />
    <label for="Email">Email:</label>
    <input type="text" value="" name="email" id="email" />
    <a href="email">*</a>

    I want to be able to tab from the name to email field with one key
    tab. Right now, it's going through the first hyperlink before moving
    to the email section. Are there some attributes that I can set to tab
    straight to email from name? I can't remove the hyperlink since there
    are js functionalities associated with it.
    Thierry Lam, May 1, 2009
    #1
    1. Advertising

  2. Thierry Lam wrote:
    > I currently have the following html:
    >
    > <label for="Name">Name:</label>
    > <input type="text" value="" name="name" id="name" />
    > <a href="name">*</a>
    > <br />
    > <label for="Email">Email:</label>
    > <input type="text" value="" name="email" id="email" />
    > <a href="email">*</a>
    >
    > I want to be able to tab from the name to email field with one key
    > tab. Right now, it's going through the first hyperlink before moving
    > to the email section. Are there some attributes that I can set to tab
    > straight to email from name? I can't remove the hyperlink since there
    > are js functionalities associated with it.


    http://www.w3.org/TR/html4/interact/forms.html#adef-tabindex


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, May 1, 2009
    #2
    1. Advertising

  3. Thierry Lam

    Eric Bednarz Guest

    Thierry Lam <> writes:

    > <input type="text" value="" name="name" id="name" />
    > <a href="name">*</a>
    > <br />
    > <label for="Email">Email:</label>
    > <input type="text" value="" name="email" id="email" />


    […]

    > Are there some attributes that I can set to tab
    > straight to email from name? I can't remove the hyperlink since there
    > are js functionalities associated with it.


    What functionalities, and what happens to that link without script?
    Sounds like you want to solve the wrong problem. You can script any
    element type, (fake) hyperlinks are usually chosen to get the behaviour
    you are trying to get rid of.
    Eric Bednarz, May 1, 2009
    #3
  4. Thierry Lam wrote:
    > I currently have the following html:
    >
    > <label for="Name">Name:</label>
    > <input type="text" value="" name="name" id="name" />
    > <a href="name">*</a>
    > <br />
    > <label for="Email">Email:</label>
    > <input type="text" value="" name="email" id="email" />
    > <a href="email">*</a>
    >
    > I want to be able to tab from the name to email field with one key
    > tab. Right now, it's going through the first hyperlink before moving
    > to the email section. Are there some attributes that I can set to tab
    > straight to email from name? I can't remove the hyperlink since there
    > are js functionalities associated with it.


    What you're saying is that you're providing the links for users to use
    at the appropriate locations within the form, but then you only want
    mouse users to be able to use them. I recommend that you leave it as is
    and let users tab through the links they don't need.
    Harlan Messinger, May 1, 2009
    #4
  5. Thierry Lam

    Neredbojias Guest

    On 01 May 2009, Harlan Messinger <>
    wrote:

    > Thierry Lam wrote:
    >> I currently have the following html:
    >>
    >> <label for="Name">Name:</label>
    >> <input type="text" value="" name="name" id="name" />
    >> <a href="name">*</a>
    >> <br />
    >> <label for="Email">Email:</label>
    >> <input type="text" value="" name="email" id="email" />
    >> <a href="email">*</a>
    >>
    >> I want to be able to tab from the name to email field with one key
    >> tab. Right now, it's going through the first hyperlink before
    >> moving to the email section. Are there some attributes that I can
    >> set to tab straight to email from name? I can't remove the
    >> hyperlink since there are js functionalities associated with it.

    >
    > What you're saying is that you're providing the links for users to
    > use at the appropriate locations within the form, but then you only
    > want mouse users to be able to use them. I recommend that you leave
    > it as is and let users tab through the links they don't need.



    My first thought to this was "Hey, good point!" but then I realized
    that with tabindex you could simply set the order-of-priority which you
    want.


    --
    Neredbojias
    People who live in glass houses must feel funny peeing.
    http://www.neredbojias.org/
    http://www.neredbojias.net/
    Neredbojias, May 1, 2009
    #5
  6. Gazing into my crystal ball I observed Neredbojias
    <> writing in
    news::

    >> What you're saying is that you're providing the links for users to
    >> use at the appropriate locations within the form, but then you only
    >> want mouse users to be able to use them. I recommend that you leave
    >> it as is and let users tab through the links they don't need.

    >
    >
    > My first thought to this was "Hey, good point!" but then I realized
    > that with tabindex you could simply set the order-of-priority which you
    > want.
    >


    And who is to say that I as a user want to use _your_ tab order? I hate
    that. I'm happily tabbing, and typing, and then I realize I've typed the
    wrong thing into the wrong field, because I _assumed_ it should be the
    next thing on the form, but, no, it's number 5 or something.

    Not to mention a maintenance nightmare.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, May 1, 2009
    #6
  7. Thierry Lam wrote:

    > I currently have the following html:


    The URL would probably have revealed your real problem, and you would now
    have a real solution to it...

    > <label for="Name">Name:</label>
    > <input type="text" value="" name="name" id="name" />
    > <a href="name">*</a>


    A very odd link. And a strange <input> element, as it has no size="..."
    attribute, so the visible width will be set by browser defaults and will be
    too small for most people's names.

    > I want to be able to tab from the name to email field with one key
    > tab.


    Remove the odd link then.

    > I can't remove the hyperlink since there
    > are js functionalities associated with it.


    Yes you can and should. But you cannot get help with doing that unless you
    show the real problem, i.e. the situation that made you include the odd
    link.

    When scripting is disabled, the element <a href="name">*</a> will act as
    what it is, as a link to resource "name" relative to the base URL of the
    document (_not_ as a link to the element with id="name" in the current
    document - href="#name" would refer to it).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, May 1, 2009
    #7
  8. Thierry Lam

    Neredbojias Guest

    On 01 May 2009, Adrienne Boswell <> wrote:

    > Gazing into my crystal ball I observed Neredbojias
    > <> writing in
    > news::
    >
    >>> What you're saying is that you're providing the links for users to
    >>> use at the appropriate locations within the form, but then you only
    >>> want mouse users to be able to use them. I recommend that you leave
    >>> it as is and let users tab through the links they don't need.

    >>
    >>
    >> My first thought to this was "Hey, good point!" but then I realized
    >> that with tabindex you could simply set the order-of-priority which
    >> you want.
    >>

    >
    > And who is to say that I as a user want to use _your_ tab order? I
    > hate that. I'm happily tabbing, and typing, and then I realize I've
    > typed the wrong thing into the wrong field, because I _assumed_ it
    > should be the next thing on the form, but, no, it's number 5 or
    > something.



    Okay, I see your point. Not that the hypothetical wishes of the
    general user are always sacrosanct to page-creation, but I do think the
    usual things should pretty much "work normally".

    > Not to mention a maintenance nightmare.


    Well, I live on Elm street so...


    --
    Neredbojias
    People who live in glass houses must feel funny peeing.
    http://www.neredbojias.org/
    http://www.neredbojias.net/
    Neredbojias, May 2, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kerri
    Replies:
    1
    Views:
    512
    Ravikanth[MVP]
    Aug 20, 2003
  2. Lars Netzel
    Replies:
    1
    Views:
    341
    Lars Netzel
    May 21, 2004
  3. Replies:
    3
    Views:
    618
  4. Replies:
    0
    Views:
    496
  5. Dave
    Replies:
    0
    Views:
    440
Loading...

Share This Page