DHTML Forum  

Go Back   DHTML Forum > dhtmlcentral.com > Crossbrowser DHTML
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15.12.2004, 22:19
Garrett Smith Garrett Smith is offline
Erfahrener Benutzer
 
Join Date: 25.05.2001
Location:
Posts: 808
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 16.12.2004, 09:49
Mark Mark is offline
Erfahrener Benutzer
 
Join Date: 28.02.2002
Location: Netherlands
Posts: 2.853
Default

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[/urlnbuchj5e0]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 17.12.2004, 23:09
Garrett Smith Garrett Smith is offline
Erfahrener Benutzer
 
Join Date: 25.05.2001
Location:
Posts: 808
Default

[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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 17.12.2004, 23:10
Garrett Smith Garrett Smith is offline
Erfahrener Benutzer
 
Join Date: 25.05.2001
Location:
Posts: 808
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 17.12.2004, 23:26
wranlon wranlon is offline
Erfahrener Benutzer
 
Join Date: 14.08.2001
Location: USA
Posts: 465
Default

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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 15.01.2005, 00:15
Garrett Smith Garrett Smith is offline
Erfahrener Benutzer
 
Join Date: 25.05.2001
Location:
Posts: 808
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT +2. The time now is 04:00.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.