By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,774 Members | 1,078 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,774 IT Pros & Developers. It's quick & easy.

get start and end position of a selected text in js

dmjpro
100+
P: 2,476
i have a text box ...
if i write debasis_moumita, then i select ebasis_mou..
now i want the start and end position of the selected text
the start and end position will be 1 and 10..
am i righ ...
is there any way to do this.....................
plz send me sample code or api supported by js.......
thanks...
Feb 5 '07 #1
Share this Question
Share on Google+
1 Reply

acoder
Expert Mod 15k+
P: 16,027
It may not be exactly what you want, but see this page - it might help.

If you want to develop purely for text fields, you may have to detect the mouse movements to get your selected text.
Feb 5 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.