How to identify what text the user has selected in the web page??
Example: I want to build an application similar to online translation:
- The user is reading some html (provided to the user through my server)
- Then he/she selects a sentence in that page (asking for its translation)
- So the javascript should handle this event and send back to the server asking for the translation...
Any ideas how to know what text the user is currently selecting??