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

highlighting text within a form

Status
Not open for further replies.

hopper

Programmer
Joined
Dec 5, 2000
Messages
27
Location
US
I think this might be more of a VBScript question but I have a password box on an asp page where the value is populated by a cookie. I want to use the onclick property to make the entry in the password box become highlighted. I've used SelStart and SelLength in VB to do this before but I am not sure how to implement this in a VBScript sub.

If anyone has any ideas I'd sure appreciate the help.
Thanks,
Hopper
 
in javascript you can use:

document.formname.elementname.select();
 
well in javascript:

<input onFocus=&quot;javascript:this.select()&quot;>

vbscript is prolly the same jared@aauser.com
 
Cool, that worked!!!
Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top