473,489 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 30397
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14252
by: fish | last post by:
Hi, I have an HTML page with a FORM and some input fields. On the fields I wish to do validation as the punters change the field values. If they get it wrong, then I tell them and then wish...
1
2176
by: Robert Dickow | last post by:
Here's an interesting problem: When Netscape Nav plays an embedded sound, the current window will lose focus. Specifically, a user may be typing into a text input field, but an embedded sound in...
10
6692
by: CES | last post by:
All, I'm having a problem returning focus back to an input field in Netscape. The code works in IE and Opera but not in netscape6+. Basically I have a function that is called upon...
6
14429
by: Csaba | last post by:
I'd like to have the cursor in the login form's username input text field when users load the login page. It works fine with the following implementation: <body...
3
2602
by: Dai Ba Wong | last post by:
Hi: Currently I am having a problem with my webpage. My page consist of two frames, one consist of input text field and the other contains link for different pop-up windows. The problem...
1
1805
by: Jens Körte | last post by:
Hi NG! I encountered some strange behaviour when using focus() I use a form with several input-fields. A user can enter stuff. After entering I want to check the value, i.e. that a number is...
3
6871
by: VA | last post by:
t=document.getElementById('mytable') is a HTML table with some input fields in its cells Why doesnt t.getElementsByTagName('tr').firstChild.focus; put the focus on that text field? It...
4
13440
by: planb | last post by:
Hi, I'd like to have a rollover like effect when a input field has the focus, any idea of how to do this with just CSS (easy enough with javascript)? What I'm thinking of is having a tips box...
1
2718
by: Will_uk | last post by:
I am trying to return focus to a form input field. If i use <form>.<field>.focus() the focus returns to the field but if the field already contains a value it selects it (blacks it out). Is it...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.