469,336 Members | 5,570 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

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??
Jul 23 '05 #1
7 30234
Previously in comp.infosystems.www.authoring.html, ScooterMX
<sc*****@nowhere.org> said:
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.


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
http://www.clarkecomputers.com.au
Jul 23 '05 #2
Mark Parnell wrote:
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.


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
Jul 23 '05 #3

"News Me" <newsTWOme@pacifierDOTcom> wrote in message
news:10*************@corp.supernews.com...
Mark Parnell wrote:
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.


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


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?


Jul 23 '05 #4
"ScooterMX" <sc*****@nowhere.org> wrote:
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.
Initial focusing may still cause different problems.
So the question still remains: How do I place that cursor in the
password field when the page loads?


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

Jul 23 '05 #5
"ScooterMX" <sc*****@nowhere.org> wrote:
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.
Initial focusing may still cause different problems.
So the question still remains: How do I place that cursor in the
password field when the page loads?


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

Jul 23 '05 #6
See the google start page:
Something like
<body onLoad="document.f.q.focus();">
<form name=f><input name=q>...

HTH
Jul 23 '05 #7
ScooterMX <sc*****@nowhere.org> wrote:
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.

Mark Parnell <we*******@clarkecomputers.com.au> wrote: So have I. It's really annoying. Take the following example:


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, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

key ring /'kE 'ri[ng]/ n. device enabling simultaneous loss of multiple keys
Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by fish | last post: by
1 post views Thread by Robert Dickow | last post: by
6 posts views Thread by Csaba | last post: by
1 post views Thread by Jens Körte | last post: by
3 posts views Thread by VA | last post: by
1 post views Thread by Will_uk | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.