On May 17, 1:49 am, Gordon <[EMAIL PROTECTED]> wrote:
> After a day's coding, I have come up with this.  It's closer to what I
> need but the final link creation phase isn't there ye.t (also each
> link will have attributes that point to a different URL, different
> event handlers, etc, so don't think they're only going to have a
> jargonbuser class and nothing else)

It goes without saying that this type of thing is much better done on
the server, but anyhow I'll suggest an alternative strategy.

Consider allowing the user to select text themselves.  When your
document.body receives a mouseup event, it looks to see if a range is
selected.  If so, look at the words selected and if any match your
"jargon" dictionary, display a help button next to the selection. If
the user clicks on the button, display help for the recognised words.
If they click anywhere else, clear the button.

This way, you can provide your own glossary for your jargon, anthing
not in your dictionary could be sourced from some online dictionary or
tossed into Google and presented in a new window or similar.  It
requires no client-side processing of the page and you don't have to
find and highlight all the jargon words - I find highlighted words
very distracting, especially since I only need to learn about a jargon
word once (or maybe twice on a slow day), I don't want the word
repeatedly highlighted just because you think I might need that.

Anyhow, over to you.


--
Rob

Reply via email to