cursor location on page load

Discussion in 'HTML' started by hev, Jan 24, 2005.

  1. hev

    hev Guest

    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
     
    hev, Jan 24, 2005
    #1
    1. Advertising

  2. 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.


    --
    - Steve
    "I think a good friend would recommend CLR to all his friends."
     
    Steve Greenaway, Jan 24, 2005
    #2
    1. Advertising

  3. While the city slept, hev ()
    feverishly typed...

    > 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.


    You can't do this with HTML, but you can with javascript:
    http://www.html-faq.com/htmlforms/?entryfocus

    Cheers,
    Nige

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Jan 24, 2005
    #3
  4. Steve Greenaway wrote:
    > 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.


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

    --
    -=tn=-
     
    Travis Newbury, Jan 24, 2005
    #4
  5. While the city slept, Steve Greenaway () 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

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Jan 24, 2005
    #5
  6. While the city slept, Travis Newbury () feverishly
    typed...

    > Steve Greenaway wrote:
    >> 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.

    >
    > 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

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Jan 24, 2005
    #6
  7. hev

    Richard Guest

    On 24 Jan 2005 17:45:30 GMT Steve Greenaway wrote:

    > 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.


    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.
     
    Richard, Jan 24, 2005
    #7
  8. hev

    hev Guest

    "nice.guy.nige" <> wrote in message
    news:...
    > While the city slept, hev ()
    > feverishly typed...
    >
    >> 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.

    >
    > You can't do this with HTML, but you can with javascript:
    > http://www.html-faq.com/htmlforms/?entryfocus
    >
    > Cheers,
    > Nige
    >
    > --
    > Nigel Moss
    > http://www.nigenet.org.uk



    Thanks Nigel

    That's exactly what I was looking for. Now my personal startup page brings
    the focus to my google search field right off the bat! I'm happy. Thanks.

    -hev
     
    hev, Jan 24, 2005
    #8
  9. In article <>, Anonymous@127.001 says...
    > On 24 Jan 2005 17:45:30 GMT Steve Greenaway wrote:
    >
    > > 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.

    >
    > He said "onload", not after the page has loaded fully.


    The onload event fires *after* the page has loaded fully, not during.

    --
    Hywel http://kibo.org.uk/
    I do not eat quiche.
     
    Hywel Jenkins, Jan 24, 2005
    #9
  10. hev

    JDS Guest

    On Mon, 24 Jan 2005 17:11:22 +0000, hev wrote:

    > 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.

    --
    JDS |
    | http://www.newtnotes.com
     
    JDS, Jan 24, 2005
    #10
  11. Kermit the Frog stuck a mic in nice.guy.nige's face, who said:

    >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. :)


    Sweet! Didn't know about that one.

    --
    - Steve
    "I think a good friend would recommend CLR to all his friends."
     
    Steve Greenaway, Jan 24, 2005
    #11
    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. =?Utf-8?B?VG9tYXMgS2VwaWM=?=

    Changing DEFAULT cursor to WAIT cursor in ASP

    =?Utf-8?B?VG9tYXMgS2VwaWM=?=, Apr 5, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,375
    Bruce Barker
    Apr 5, 2005
  2. Kevin Davis

    Cursor location on page

    Kevin Davis, Jul 18, 2003, in forum: Java
    Replies:
    0
    Views:
    384
    Kevin Davis
    Jul 18, 2003
  3. invy
    Replies:
    4
    Views:
    422
    CBFalconer
    Dec 28, 2006
  4. dmaziuk
    Replies:
    3
    Views:
    626
    Chris Gonnerman
    Jan 25, 2011
  5. ScooterMX
    Replies:
    4
    Views:
    133
    Randy Webb
    Jan 12, 2005
Loading...

Share This Page