Im making a submit form for a friend and am having some trouble.
The form is made and works great. I have made it so when a user clicks on the field, the text in the box dissapears, love it.
HOWEVER, if a user clicks on the box, doesnt type anything then clicks away, then the original text remains gone and I fear the user may forget what the field is for.
My question is how I make it so the original field's text return if the user clicks on the box, types nothing, thus clearing the box's contents. Can this be done? So far the only way i can make the text re-appear is if i navigate away from then back to the page. Also, I dont really want to use a reset button as it affects the design.
Here is an example of a field I have made:
<input onfocus="this.select()" name="name" type="text" value="Name:"
<input onfocus="this.select()" name="email" type="text" value="E-mail:">
Here is the page:
http://www.musicamor.com/iu/index-7.html
Ive read about onblur and tried a few examples but cant seem to get it to work right.
Thank you for reading,
I appreciate your time
The form is made and works great. I have made it so when a user clicks on the field, the text in the box dissapears, love it.
HOWEVER, if a user clicks on the box, doesnt type anything then clicks away, then the original text remains gone and I fear the user may forget what the field is for.
My question is how I make it so the original field's text return if the user clicks on the box, types nothing, thus clearing the box's contents. Can this be done? So far the only way i can make the text re-appear is if i navigate away from then back to the page. Also, I dont really want to use a reset button as it affects the design.
Here is an example of a field I have made:
<input onfocus="this.select()" name="name" type="text" value="Name:"
<input onfocus="this.select()" name="email" type="text" value="E-mail:">
Here is the page:
http://www.musicamor.com/iu/index-7.html
Ive read about onblur and tried a few examples but cant seem to get it to work right.
Thank you for reading,
I appreciate your time