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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text fields

Status
Not open for further replies.
Feb 25, 2003
3
US

Does anybody know how you can put default text in a text box, then when someone clicks in the textbox the default text disappears and also how do I put default text in a password text field so you can read what it says rather than appearing as 'stars' like you get in a password field.
 
use <input type=text name=blah value=start>

this will let the field be see able and will have start in it when the page loads..

when you use type-password all the field will be ****

hope that helps.

hui
 
you can also do this when you want to click on it and the text disappear

<form name=formname method=post action=whatever.asp>
<input type=text name=blah value=start onClick=&quot;document.formname.blah.value = ''&quot;>
</form>

hope that helps,
hui
 

Thanks hui

That worked great - except the disappearing text only works in IE not Netscape. Any alternatives so it works in Netscape too?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top