Link to home
Start Free TrialLog in
Avatar of isaacr25
isaacr25

asked on

Help with initial form field values

I have the following form with initial values in the fields. I would like this to happen: When the user clicks in a field, the initial value disappears. If they click out of the field, with nothing entered, then the initial value re-appears.

<form action="contact.asp" id="form" style="margin:0; padding:0" method="post">
                                                  <div align="center">
                                                    <input name="Name" type="text"  class="w" id="Name" style="width:210px; height:25px;  " value=" &nbsp;your name"  >
                                                    <br>
                                                    <input name="Email" type="text"  class="w" id="Email" style="width:210px; height:25px; " value=" &nbsp;e-mail" >
                                                    <br>
                                                    <input name="Phone" type="text"  class="w" id="Phone" style="width:210px; height:25px; " value=" &nbsp;phone" >
                                                    <br>
                                                    <textarea name="Message"  cols="35" rows="35" class="w" id="Message" style="width:210px; height:90px; overflow:hidden "> &nbsp;message</textarea>
                                                  </div>
                                                  <div style="margin:12 15 0 50px;"><input name="clear" type="image" id="clear" style=" border-style:none  " src="images/6_k1.gif" onClick="this.form.reset(); return false;"><input name="submit"  type="image" id="submit" style="border-style:none; margin-left:16px "  src="images/6_k2.gif" >
                                                  </div>
</form>
ASKER CERTIFIED SOLUTION
Avatar of archang3l
archang3l
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial