?
Solved

JavaScript Highlight  or Select data a textbox

Posted on 2006-11-09
4
Medium Priority
?
455 Views
Last Modified: 2012-08-13
Dear Experts.

I am using ASP.NET2.0, C#.
I want to make Highlight  or Select data in side a textbox through JavaScript.
0
Comment
Question by:RamyBouchra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17905629
Define "Highlight":  change color?  change selection?

Bob
0
 
LVL 16

Accepted Solution

by:
muzzy2003 earned 2000 total points
ID: 17905799
See the following PAQ for JavaScript to achieve this:

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21843732.html
0
 

Author Comment

by:RamyBouchra
ID: 17906534
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17906576
You must have missed this:

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

Call it with the onFocus event.

Bob
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question