[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Any ideas? Getting more and more desperate...
|
Hi Chris,
Wow... thanks for your help! Your idea is very nice!
I don't have the method "browser.execute(..)" in my SWT Browser Widget
(did you write kind of a subclass of browser with a method "execute(..)"?),
so I couldn't run your code snippet.
But I understand the thinking behind your idea and I will try to find a way
for the "execute" !
Thanks very much!
Regards,
Othmar
"Christophe Cornu" <christophe_cornu@xxxxxxxxxx> wrote in message
news:co51aa$u23$1@xxxxxxxxxxxxxxxxxx
> >My question: How is it possible to detect that the user marked a word
> >within the displayed webpage?
>
> Apparently web developers would use code like the one at:
> http://www.quirksmode.org/js/selected.html
>
> The following snippet is built after this technique. Should work for
simple
> documents (e.g. no multiple frames, no mouse up event trapped by the
> document itself) but you will need to see by yourself if it fits the HTML
> you are expecting or if it needs to be adapted.
>
> The snippet loads a simple HTML page. On every mouse up, it displays the
> selection in the SWT Text widget on the right. Hope this gives you some
> hints...
>
> Chris
>
> [... code snippet ...]