...

View Full Version : Creating example disappearing input text.



iceflyin
09-29-2007, 03:36 AM
How do you create text for a search field that disappears when a user clicks it? Like... Have the text "eg. Home Remodel", then user click the field and it disappears...

Javascript is the only way?

Antoniohawk
09-29-2007, 04:24 AM
I'd say that Javascript is the only way to go on this one. Try something like this.


<input value="default_value" onfocus="if (this.value == 'default_value') this.value = '';" />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum