Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   how to get text below mouse pointer (http://www.velocityreviews.com/forums/t164851-how-to-get-text-below-mouse-pointer.html)

snehal 04-18-2006 07:28 AM

how to get text below mouse pointer
 
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.


Travis Newbury 04-18-2006 09:49 AM

Re: how to get text below mouse pointer
 
snehal wrote:
> 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...?


google "dhtml text at cursor". You will be rewarded with tons of
examples.


snehal 04-18-2006 12:22 PM

Re: how to get text below mouse pointer
 
google "dhtml text at cursor". No result found


Martin Jay 04-18-2006 12:49 PM

Re: how to get text below mouse pointer
 
In message <1145362931.467692.22010@i39g2000cwa.googlegroups. com>,
snehal <snehalapatil@gmail.com> writes
>google "dhtml text at cursor". No result found


"About 690,000 found" when I tried. :)

Try doing a Google web search.
--
Martin Jay

David Segall 04-18-2006 03:43 PM

Re: how to get text below mouse pointer
 
"snehal" <snehalapatil@gmail.com> wrote:

>google "dhtml text at cursor". No result found

I don't think that he wanted you to include the quotation marks.

Jonathan N. Little 04-18-2006 04:47 PM

Re: how to get text below mouse pointer
 
David Segall wrote:
> "snehal" <snehalapatil@gmail.com> wrote:
>
>> google "dhtml text at cursor". No result found

> I don't think that he wanted you to include the quotation marks.

Just a word of warning...many are very old JavaScript, that is pre-W3C
DOM browsers with *great* browser sniffing like:

if(document.layers){ blah; }
if(document.all){ blah; }

and nary a

if(document.getElementById){ the blah that you should code for; }

so for the newbie if you do not know what I am talking about then much
of what you see with above search will not yield much help. I would
advise using CSS methods

Google "CSS tooltips" and steer clear of JavaScript solutions.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

frederick@southernskies.co.uk 04-18-2006 05:00 PM

Re: how to get text below mouse pointer
 
Jonathan N. Little wrote:
> Google "CSS tooltips" and steer clear of JavaScript solutions.


I don't believe that's what the OP was after; (s)he wanted to be able
to "select" a word, say amidst some text, and then feed it to a script.
I suppose a bit like how you can double-click on a word in a word
processor and then access a context-sensitive menu for a spell-check or
whatever.

I have absolutely no idea how (or why) you'd go about doing it, though.
One for comp.lang.javascript or similar, perhaps?


--
AGw.


Jonathan N. Little 04-18-2006 08:59 PM

Re: how to get text below mouse pointer
 
frederick@southernskies.co.uk wrote:
> Jonathan N. Little wrote:
>> Google "CSS tooltips" and steer clear of JavaScript solutions.

>
> I don't believe that's what the OP was after; (s)he wanted to be able
> to "select" a word, say amidst some text, and then feed it to a script.
> I suppose a bit like how you can double-click on a word in a word
> processor and then access a context-sensitive menu for a spell-check or
> whatever.
>
> I have absolutely no idea how (or why) you'd go about doing it, though.
> One for comp.lang.javascript or similar, perhaps?



Ah, yes I see you are correct by studying OP's initial post. I am fairly
sure you cannot do what OP wishes with HTML even with JavaScript to
assist. In fact finding the exact mouse position with respect to the
document and viewport is a major challenge for cross-browser support

http://www.quirksmode.org/js/events_properties.html
Javascript - Event properties

let alone 'recognizing' what word is where within the flow of the
document! Where it was varies by browser, viewport size, font size and
font used by user's system! Maybe some java applet or within a flash
object but anywhere in a webpage? Don't think it is possible?



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

snehal 04-19-2006 06:58 AM

Re: how to get text below mouse pointer
 
Hi all,

Thanks for ur replies
Is there is any way to get text selected by the user on form.?
but again the text can be from text box,caption of button, Labels,or
simple text on form...


Thanks once again
Snehal



All times are GMT. The time now is 05:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.