Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    input tag onFocus clear the value text?

    this is prob ez for u guys..

    but i'm having problem.

    i have a form which i have added a value = "enter email here" when the user click in the input field.. i want it to disspear.and show that blinking horizontal line where they can now type..


    thx

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts

  • #3
    New Coder
    Join Date
    Oct 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    cool thx.

    i didnt need the js..

    i just added this into the input and it works fine too..



    onFocus="this.value=''"

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    That is JavaScript.

  • #5
    New Coder
    Join Date
    Oct 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ya .. but i meant the header thing i didnt need to put it..

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmmmmm..... youd pobably be better off using http://www.javascriptkit.com/script/...rdefault.shtml because if the user went back to edit the field after they had originally filled it in, it would clear again... probably slightly annoying...
    redhead


  •  

    Posting Permissions

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