SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Form Question

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2003
    Location
    Chicago, IL
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Form Question

    I have a form field that has text in it. The visitor comes, deletes the text, adn then enters their query for the form search (domain name) and then it brings you to a new page.

    example:
    http://www.orangepiranha.com
    In the middle of the page there is the form field.

    I want the form to just be able to be clicked on on the text 'search domain' disappears. What do I need to do to make this happen?

    Thanks,
    -Ty

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    This should work

    Code:
    <input type="text" onfocus="this.value='';" onblur="if (this.value=='') {this.value='search domain:';}" value="search domain"  name="search domain" />
    Hope it helps

    Later
    Johnny


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
  •