[thelist] JS text-selection script needed

Dunstan Orchard dunstan at 1976design.com
Wed Nov 19 13:20:11 CST 2003

Hi everyone,

I wonder if anyone can help me out? I'm looking for some JS that will 
report back to me the 'start character number' and the 'end character 
number' generated when a user drag-selects some text on an HTML page.

I want to be able to calculate what text they've selected by using these 
start and end positions.

Does anyone have anything like this lurking away in their bookmarks?

I'm stumped :o/

Many thanks - Dunstan

Dorset, England
Work: http://www.1976design.com/
Play: http://www.1976design.com/blog/
Learn: http://webstandards.org/

More information about the thelist mailing list