cursor location on page load

H

hev

I'm looking for html code that will allow me to place the cursor location on
page load to whatever text field I choose. Thanks.

-hev
 
S

Steve Greenaway

Kermit the Frog stuck a mic in hev's face, who said:
I'm looking for html code that will allow me to place the cursor location on
page load to whatever text field I choose. Thanks.

I can't really help you with that other than to say, 'check out
javascript'.

But please, please don't do it. I REALLY get annoyed when I'm halfway
through typing a web form, and the cursor suddenly shifts to a different
field while I'm typing my password.
 
T

Travis Newbury

Steve said:
Kermit the Frog stuck a mic in hev's face, who said:
I can't really help you with that other than to say, 'check out
javascript'.
But please, please don't do it. I REALLY get annoyed when I'm halfway
through typing a web form, and the cursor suddenly shifts to a different
field while I'm typing my password.

If it happens on pageload, why should it shift when you are halfway
through entering data in the form?
 
N

nice.guy.nige

While the city slept, Steve Greenaway ([email protected]) feverishly
typed...

[setting form field focus]
But please, please don't do it. I REALLY get annoyed when I'm halfway
through typing a web form, and the cursor suddenly shifts to a
different field while I'm typing my password.

The link I gave to the OP (http://www.html-faq.com/htmlforms/?entryfocus)
overcomes that Major Annoyance by only setting the focus if the form isn't
already in use. :)

Cheers,
Nige
 
N

nice.guy.nige

While the city slept, Travis Newbury ([email protected]) feverishly
typed...
If it happens on pageload, why should it shift when you are halfway
through entering data in the form?

Because the form may be displayed before the onload event fires (eg. images
are still loading, etc) in which time the user can be typing merrily away in
the form. IIRC Google Groups Advanced Search form can be a pain for that. My
suggestion uses javascript to only set the focus if the form is not yet in
use. It ain't perfect, but then, neither am I... ;-)

Cheers,
Nige
 
R

Richard

Kermit the Frog stuck a mic in hev's face, who said:
I can't really help you with that other than to say, 'check out
javascript'.
But please, please don't do it. I REALLY get annoyed when I'm halfway
through typing a web form, and the cursor suddenly shifts to a
different
field while I'm typing my password.

He said "onload", not after the page has loaded fully.
So that your mouse is positioned on a certain form before you do anything.
Sure it's annoying. Just as are all those cute flashing banner ads, hit the
target ads and such.
But at least I can move the mouse.
 
J

JDS

I'm looking for html code that will allow me to place the cursor location
on page load to whatever text field I choose. Thanks.

-hev

I see you got your answer. Be careful in implementing something like
this, though. For example, focusing the cursor on a form that is far down
the page will cause the page to scroll all the way down all of a sudden.
It has a high potential to become an annoying nuisance.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top