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

referencing selected text in textboxes?

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
US
I know there's a way of extracting the text in a textbox or textarea, but is there a way to extract just the text that is currently selected in a textbox or textarea?<br><br>Thanks... <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
 
In IE 4+ you can do:<br><br>&nbsp;&nbsp;var selectedtext = document.formname.inputname.selection.createRange();
 
thanks... any way in Netscape 4.x? <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top