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

How to set focus and automatically select all 1

Status
Not open for further replies.

awingnut

Programmer
Feb 24, 2003
759
US
I have a text box and when I set focus() on that box I also want to select all so that what the user types replaces all of what is there before getting focus. Can someone tell me how? TIA.
 
Thanks. The '.select()' was it.

Does anyone know if there is an online reference manual similar to the one for PHP ( that makes it easy to find all these functions for javascript? It seems all the ones I can find are not well organized. One needs to know what one is looking for before one can find it.
 
Thanks. I looked at that at one time but my concern with using MS is that I don't want to get wrapped around the axle with MS/IE-only stuff. My javascripts need to be not only cross-browser but cross-platform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top