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

Highlight functions

Status
Not open for further replies.

kehers

Programmer
Aug 31, 2005
56
A2
is there any way i can get values highlighted in a form element say a textare box?
 
What do you mean by highlighed? You can change the text and background colours of text or textarea elements... But if you're talking about changing only a portion of the contents, then you would be gettng into something a lot different.

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
What i mean is getting the values say group of text highlighted in say a textare box in a form. for example i once saw on a site a button which on clicks highligh the whole content of a textarea box
 
You're still talking about two different things:
getting the values say group of text highlighted in say a textare box
sounds like you want to highlight only a part of the text in a textarea, but
highligh the whole content of a textarea box
says that you want to highlight all of the text in the textarea.

The two require entirely different methods. In fact, you can't do the first with just a textarea.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
You probably saw something like This..

Code:
<form name="SA">
<textarea name="textA" rows="5" cols="20">
Text To HighLight 
</textarea>
<BR>
<input type="button" value="HighLight" onClick="javascript:this.form.textA.focus();this.form.textA.select();">
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top