SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: JS Question

  1. #1
    SitePoint Guru godsfshrmn's Avatar
    Join Date
    Mar 2001
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone know the html and javacript code to have a textarea form field, have a message in it, and when the user clicks on the textarea to type the text will go away.
    s c r i p t s f o r y o u . n e t
    ScriptsForYou

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's what I have on my site:

    <textarea name="comments" class="text" cols="30" rows="7" tabindex="4" onFocus="if (this.value == '..comments..') this.value = ''" onBlur="if (this.value == '') this.value='..comments..'" wrap="virtual">..comments..</textarea>

  3. #3
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can take out tabindex and class of course.


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
  •