SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    USA
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Cursor in TEXTAREA when page loads...

    I'd like to have a text cursor inside of a textarea input box when the page loads, but I lack the Javascript know-how to do it. Could someone point me in the right direction?


  2. #2
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    assuming that your textarea was named "textarea1", and your form was named "form1", you'd do this...

    Code:
    <body onload="document.form1.textarea1.focus()">
    ----Adopt-a-Sig----
    Your message here!

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    USA
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's perfect! Thanks a lot for your help!



Bookmarks

Posting Permissions

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