java: change form input

Discussion in 'Programming/Scripts' started by signature16, Jul 3, 2006.

  1. signature16

    signature16 New Member

    I want to have the value of a text input field say something, but when the users clicks on the box to enter their own info....everything needs to go away allowing them to put their info in.


    How do i do this?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Have a look at the source code of the HowtoForge front page, especially the form where you can subscribe to the HowtoForge newsletter. It does exactly the same. :)
     
  3. signature16

    signature16 New Member

    <script type="text/javascript">

    function ClearMe()
    {

    document.getElementById("Text1").value=" ";
    }
    </script>

    <input type=text name="attribute1" class="attributeinput" size="15" value="First Name" id="Text1" onclick="ClearMe()"/>
     
  4. falko

    falko Super Moderator ISPConfig Developer

    So you got it working? :)
     
  5. signature16

    signature16 New Member

    i did get it working. thank you.
     

Share This Page