focus on a input field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ScooterMX

    focus on a input field

    I've seen where login pages (and other form-based pages) place the cursor in
    the first field of a form after the page loads.

    I'm familiar with the tabIndex, but that only works once you hit the tab
    key.

    What function automatically places the cursor in any give form field??


  • Mark Parnell

    #2
    Re: focus on a input field

    Previously in comp.infosystem s.www.authoring.html, ScooterMX
    <scooter@nowher e.org> said:
    [color=blue]
    > I've seen where login pages (and other form-based pages) place the cursor in
    > the first field of a form after the page loads.[/color]

    So have I. It's really annoying. Take the following example:

    I'm on dialup, so your page takes a while to load. As soon as the form
    fields are visible, I start filling them out. The page finishes loading
    just as I'm about to type my password.

    a) A normal page - I will type my password in the password field, hit
    enter and get logged in.

    b) A page that does what you are asking - my password goes into the
    login field. This means that not only do I have to take it out of that
    field and type it again into the password field, but anyone looking over
    my shoulder now knows my password. This is a *bad* thing.

    --
    Mark Parnell

    Comment

    • News Me

      #3
      Re: focus on a input field

      Mark Parnell wrote:[color=blue]
      > So have I. It's really annoying. Take the following example:
      >
      > I'm on dialup, so your page takes a while to load. As soon as the form
      > fields are visible, I start filling them out. The page finishes loading
      > just as I'm about to type my password.
      >
      > a) A normal page - I will type my password in the password field, hit
      > enter and get logged in.
      >
      > b) A page that does what you are asking - my password goes into the
      > login field. This means that not only do I have to take it out of that
      > field and type it again into the password field, but anyone looking over
      > my shoulder now knows my password. This is a *bad* thing.
      >[/color]

      I feel your pain. I've even gone so far as to hit the "Enter" key
      without checking the form. I usually feel compelled to immediately
      change my password after this happens.

      NM

      --
      convert uppercase WORDS to single keystrokes to reply

      Comment

      • ScooterMX

        #4
        Re: focus on a input field


        "News Me" <newsTWOme@paci fierDOTcom> wrote in message
        news:10u711hcmc 16e9c@corp.supe rnews.com...[color=blue]
        > Mark Parnell wrote:[color=green]
        > > So have I. It's really annoying. Take the following example:
        > >
        > > I'm on dialup, so your page takes a while to load. As soon as the form
        > > fields are visible, I start filling them out. The page finishes loading
        > > just as I'm about to type my password.
        > >
        > > a) A normal page - I will type my password in the password field, hit
        > > enter and get logged in.
        > >
        > > b) A page that does what you are asking - my password goes into the
        > > login field. This means that not only do I have to take it out of that
        > > field and type it again into the password field, but anyone looking over
        > > my shoulder now knows my password. This is a *bad* thing.
        > >[/color]
        >
        > I feel your pain. I've even gone so far as to hit the "Enter" key
        > without checking the form. I usually feel compelled to immediately
        > change my password after this happens.
        >
        > NM
        >
        > --
        > convert uppercase WORDS to single keystrokes to reply[/color]

        great suggestions.

        There is only one form field on this page, and it's a password field. The
        entire page is 4k, something even a 300 baud modem can pull up quickly.

        My goal was to place the cursor IN that password field, so that people that
        like to just type their password then hit enter, can.

        So the question still remains: How do I place that cursor in the password
        field when the page loads?




        Comment

        • Jukka K. Korpela

          #5
          Re: focus on a input field

          "ScooterMX" <scooter@nowher e.org> wrote:
          [color=blue]
          > There is only one form field on this page, and it's a password field.
          > The entire page is 4k, something even a 300 baud modem can pull up
          > quickly.[/color]

          Initial focusing may still cause different problems.
          [color=blue]
          > So the question still remains: How do I place that cursor in the
          > password field when the page loads?[/color]

          Well, you don't do it in HTML anyway, so the question is off-topic.
          You could do it JavaScript, with the usual caveats.

          --
          Yucca, http://www.cs.tut.fi/~jkorpela/
          Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

          Comment

          • Jukka K. Korpela

            #6
            Re: focus on a input field

            "ScooterMX" <scooter@nowher e.org> wrote:
            [color=blue]
            > There is only one form field on this page, and it's a password field.
            > The entire page is 4k, something even a 300 baud modem can pull up
            > quickly.[/color]

            Initial focusing may still cause different problems.
            [color=blue]
            > So the question still remains: How do I place that cursor in the
            > password field when the page loads?[/color]

            Well, you don't do it in HTML anyway, so the question is off-topic.
            You could do it in JavaScript, with the usual caveats.

            --
            Yucca, http://www.cs.tut.fi/~jkorpela/
            Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

            Comment

            • Axel Brünn

              #7
              Re: focus on a input field

              See the google start page:
              Something like
              <body onLoad="documen t.f.q.focus();" >
              <form name=f><input name=q>...

              HTH

              Comment

              • Darin McGrew

                #8
                Re: focus on a input field

                ScooterMX <scooter@nowher e.org> wrote:[color=blue][color=green]
                >> I've seen where login pages (and other form-based pages) place the cursor in
                >> the first field of a form after the page loads.[/color][/color]

                Mark Parnell <webmaster@clar kecomputers.com .au> wrote:[color=blue]
                > So have I. It's really annoying. Take the following example:[/color]

                I've gone to ecommerce sites that have done this, and what tends to happen
                is that I start using the keyboard to scroll down a catalog page, and then
                suddenly the page snaps back to the top and directs the input focus to the
                search form that is part of the site's page template.

                So now I need to scroll down again, but I can't use the keyboard commands
                that I was just using--because they no longer work, because the input focus
                is in the search form, rather than on the page as a whole.

                It's almost as annoying as search forms that automatically clear themselves
                every time they receive input focus.

                And they wonder why we disable JavaScript...
                --
                Darin McGrew, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
                Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

                key ring /'kE 'ri[ng]/ n. device enabling simultaneous loss of multiple keys

                Comment

                Working...