• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

JavaScript Highlight or Select data a textbox

Dear Experts.

I am using ASP.NET2.0, C#.
I want to make Highlight  or Select data in side a textbox through JavaScript.
0
RamyBouchra
Asked:
RamyBouchra
  • 2
1 Solution
 
Bob LearnedCommented:
Define "Highlight":  change color?  change selection?

Bob
0
 
muzzy2003Commented:
See the following PAQ for JavaScript to achieve this:

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21843732.html
0
 
RamyBouchraAuthor Commented:
thank you for your reply
but i want it to be like if i pres TAB so it will be selected so i can write over it with out deleting the exsiting value.

thank you.
0
 
Bob LearnedCommented:
You must have missed this:

   textbox.setSelectionRange(0, textbox.value.length);

Call it with the onFocus event.

Bob
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now