Results 1 to 3 of 3

Thread: Cursor in Input box ***RESOLVED***

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    South Wales (UK)
    Posts
    83

    Cursor in Input box ***RESOLVED***

    When my page has loaded, how do I make the cursor automatically appear in an input box e.g.
    Code:
    <input type="password" name="password" size="10">
    As an example, when you goto google.com the cursor is immediately in the search box.

    Thanks.
    Last edited by aaronskw; Mar 11th, 2004 at 10:24 AM.

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    Write it like this:
    Code:
    <input type="password" name="password" size="10" id="passw">
    Then insert this into your body tag:
    Code:
    onLoad="document.getElementById('passw').focus()"
    Have I helped you? Please Rate my posts.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    South Wales (UK)
    Posts
    83
    Thanks very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width