File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get text under current corsor position

 
snehal Pa
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

How can I get the word(text) under mouse pointer from my web page?
I want to get the exact word under the mouse pointer from an html page & send it for further processing.

I am able to get current position of the mouse pointer on the html form...
But then how to get the text at that position...?
this text can be from the text box, toolbar, caption of button anything from my form


Thanks & Regards,
Snehal.

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not a servlet question, moving to HTML and Javascript

Dave
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could get it if they highlight th word with createText range, but you will not be able to figure out the word with just the mouse position. Different resolutions and such will not all you to do that. You could rip apart the entiore document.Add spans with mouseovers, but you are talk a long process that will make you users wait forever.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic