DIGIT-ARC read-only archive · snapshot: July 23, 2026

Creating autoclear form fields

4 posts · originally from https://geek.digit.in/community/threads/creating-autoclear-form-fields.72478/

krates
krates Original post #1
Nov 5, 2007 at 2:08 PM
Whenever you work with forms there is value field like you are working in a text field you will write


<input type=”text” name=”textfield” value=”welcome” />

Now that value is displayed adressing you what you have to write there
How the user will use it he will click on the field and delete the string welcome and write what he has to now if you want not to pain the user using a autoclear field using jscript event onFocus


Syntax

<input type=”text” name=”n” value=”Your message” onFocus=”if(this.value==’Your message’)this.value=’ ‘;”>

Note this thing is case sensitive
means


Welcome is not equal to welcome
when changing the welcome string note this point
And you are done

*www.easytutorial.info/?p=4




Thanks
krares
Gigacore
Nov 7, 2007 at 9:36 AM
thanks for sharing :)
A
almighty #3
Nov 7, 2007 at 9:44 AM
Good Post :)
hullap
hullap #4
Nov 13, 2007 at 6:23 PM
thsnks m8