Is it possible to get only the "Selected" text out of a TextBox

C

Chris Bates

Ok guys, here is what I am trying to do.

Lets say I have a TexBox server control on a page.

Lets say that TextBox has a bunch of text in it.

Lets say that a user uses thier mouse to select a small part of the text
then hits a button.

I would like to be able on that button push to trap / get only the text the
user has selected.

Anyone have any ideas, I am coming up with nothing on google.

Thanks

Chris
 
A

Alessandro Zifiglio

hi Chris,
You are looking at writing some javascript to exclude the unselected text in
your textbox when your submit button is clicked, that should populate the
forms collection with the updated value in the textbox before the submit
occurs.
The following link might help you get started with the js you need to write.
http://www.quirksmode.org/js/selected.html
Good luck,
Alessandro Zifiglio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top