Hello,
in a mask we have a textbox, which has an amount. The user probably wants to change the amount. To make it comfortable for the user we set the focus into the textbox. So the user can see the textbox with the amount and a blinking cursor in the textbox. If he wants to change the amount he has to delete the old amount and the to enter the new amount. So the user wishes that the amount should be marked (i don't know if this is the correct english word), so that he directly can overwrite the value.
Is there such a possibility?
Dieter
Marking the Content of a Textbox
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
-
- Experienced User
- Posts: 116
- Joined: Wed Sep 05, 2012 11:14 am
- First Name: Eric
- Last Name: Hill
- Company Name: Integrated Corporate Solutions
- Phone: 256-760-8239
- Address 1: 501 S Wood Avenue
- City: Florence
- State / Province: Alabama
- Zip / Postal Code: 35630
- Country: United States
- Contact:
Re: Marking the Content of a Textbox
Try this on the onfocus event for the text box:
this.select();
This will select/highlight the entire textbox so the user can just start keying over the existing data.
Hope this helps!
this.select();
This will select/highlight the entire textbox so the user can just start keying over the existing data.
Hope this helps!
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Marking the Content of a Textbox
Great!
Works perfect!
Thank you very much.
Works perfect!
Thank you very much.
Who is online
Users browsing this forum: No registered users and 3 guests