How to select all text in textbox when it gets focus?

How to select all text in textbox when it gets focus?

Post by guy » Fri, 08 Oct 2004 06:17:45


Is it possible to select all text in a asp text box when it gets focus? How?
 
 
 

How to select all text in textbox when it gets focus?

Post by Microsoft » Fri, 08 Oct 2004 06:40:59

try using javascript, something like this should do it.............

onClick="javascript:this.form.text_box_name.focus();this.form.text_box_name.
select();">

just a guess mind you...........
John Timney
Microsoft Regional Director
Microsoft MVP




How?