![]() |
|
#1
|
|||
|
|||
|
It takes offsetX from each word. This has to be seen to be believed.
http://dhtmlkitchen.com/experiment/t...t/offsetX.html http://dhtmlkitchen.com/ - The best DHTML website! |
|
#2
|
|||
|
|||
|
Hmm, it's strange because the text is but one textnode, yet you can get different offsets for each letter in Gecko, IE and Opera. Didn't know about that one!
- [url="http://neo.dzygn.com/"]Mark[/url nbuchj5e0] |
|
#3
|
|||
|
|||
|
[code:83xm0z3o7h]
function getOffsetWord(event, isOpera) { if(isOpera && !isInPaddingArea(event)) return event.clientX; } [/code:83xm0z3o7h] Only in Opera. http://dhtmlkitchen.com/ - The best DHTML website! |
|
#4
|
|||
|
|||
|
The target is not a textNode. If you try alert(event.target.tagName), you'll get the element's tagName.
http://dhtmlkitchen.com/ - The best DHTML website! |
|
#5
|
|||
|
|||
|
At first I was wondering how I was getting a value of 'undefined' in Opera by clicking on the very edge of the first letter of a particular word. Then I looked at your alert and it made sense.
Stephen W. Cote wranlon@hotmail.com http://www.whitefrost.com/ |
|
#6
|
|||
|
|||
|
According to [url="http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/clienty.asp"]Microsoft's example page[/url:guveh6djuk], you can retrieve clientX from the element as well.
[code:guveh6djuk]<BODY onmousemove="window.status = 'X=' + this.clientX + ' Y=' + this.clientY" ondblclick="clientCoords()">[/code:guveh6djuk] I have not been able to make this work. http://dhtmlkitchen.com/ - The best DHTML website! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|