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

Automatic Select All in Text Field

Status
Not open for further replies.

Lotruth

Programmer
Joined
May 2, 2001
Messages
133
Location
US
Is there a way to set your text fields so that all the default text is automatically selected when a user clicks in the field?
 
This is very simple:

<input type=&quot;text&quot; ... onclick=&quot;this.select()&quot;>
 
Thanks, I really wanted to select all for the next field after hitting tab, but your tip works with onfocus as well. Explorer does this by default, but you need to use the code for it to work in Netscape. Problem solved. Thanks alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top