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=" your name" >
<br>
<input name="Email" type="text" class="w" id="Email" style="width:210px; height:25px; " value=" e-mail" >
<br>
<input name="Phone" type="text" class="w" id="Phone" style="width:210px; height:25px; " value=" phone" >
<br>
<textarea name="Message" cols="35" rows="35" class="w" id="Message" style="width:210px; height:90px; overflow:hidden "> 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>
<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=" your name" >
<br>
<input name="Email" type="text" class="w" id="Email" style="width:210px; height:25px; " value=" e-mail" >
<br>
<input name="Phone" type="text" class="w" id="Phone" style="width:210px; height:25px; " value=" phone" >
<br>
<textarea name="Message" cols="35" rows="35" class="w" id="Message" style="width:210px; height:90px; overflow:hidden "> 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()
</div>
</form>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.