J
Jeremy J Starcher
test2009040501.htmlHere is the previous example updated to work with Mozilla as well as IE:
http://home.arcor.de/martin.honnen/javascript/2009/04/
Fails under both Opera and Konqueror.
test2009040501.htmlHere is the previous example updated to work with Mozilla as well as IE:
http://home.arcor.de/martin.honnen/javascript/2009/04/
You ought to wrap each single word in a single htmlElement because the
target of a click event is an element.
He ought to do nothing of the sort. Clicking text is like selecting
zero characters. As Martin mentioned, a proper solution involves text
ranges. Unfortunately, due to IE's proprietary implementation, a
cross-browser solution is difficult (though definitely not
impossible.)
He does not want to *select* anything. He wants to know the word that
the user has clicked on. AFAIK, the best way to handle that with ease
Clicked.
is to wrap each word in an element. Either beforehand at the server
side or later on at the client side. If that's not a proper cross-
browser solution, please let me know why and what's the proper way.
the user has clicked on. AFAIK, the best way to handle that with ease
is to wrap each word in an element. Either beforehand at the server
side or later on at the client side. If that's not a proper cross-
browser solution, please let me know why and what's the proper way.
By the way, lets say that in editable page mode, I do indeed wrap each
word in an element.
And the user selects a range of words and then
clicks. Will my event handler be able to detect each word in the
range as being a target of the click?
the user has clicked on. AFAIK, the best way to handle that with ease
is to wrap each word in an element. Either beforehand at the server
side or later on at the client side. If that's not a proper cross-
browser solution, please let me know why and what's the proper way.
Jorge,
Can you suggest what I might do if the document that I'm munging
already contains a large <span> range? How can I wrap an individual
word then? Using <a>?
Why are you asking somebody who doesn't have the solution for further
information about his non-solution? Doesn't seem like a strategy that
will bear fruit.
David,
Can you elaborate on the best solution. I checked your previous posts
and saw that you were talking about text ranges. But when you click a
text range, it disappears.
Jorge,
Can you suggest what I might do if the document that I'm munging
already contains a large <span> range?
How can I wrap an individual word then? Using <a> ?
Why are you asking somebody who doesn't have the solution for further
information about his non-solution? Doesn't seem like a strategy that
will bear fruit.
We'll see.
I don't care to see you re-enact some blunder from the days of IE3.
Why don't you ever listen?
Why don't you post something for us to see (and learn) ?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.