Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box Initial Value Font Color 2

Status
Not open for further replies.

rojas1mg

Programmer
Jun 15, 2004
119
US
Hello. I'm wondering if there's a way to have a text box have a lighter font (lightgray) with a default value in it, however, once the user types in it, the default info disappears and as they type, it'll be normal black text. Thanks.

rojas1mg - - - I love Tek-Tips and all members who reply.
 
That was fantastic. Is there anyway to make it disappear when the guest types in there?

rojas1mg - - - I love Tek-Tips and all members who reply.
 
>>That was fantastic. Is there anyway to make it disappear when the guest types in there?

disappear???

Known is handfull, Unknown is worldfull
 
My apologies for not being clear. Have the default value, disappear when they click in it.

rojas1mg - - - I love Tek-Tips and all members who reply.
 
<input type="text" name="t" style="color: gray;" value="default" onkeydown="this.style.color = 'black';" onfocus='this.value=""' />

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top