This content has been marked as final.
Show 2 replies
-
1. Re: X and Y Co-ordinates
jdeline Jul 21, 2006 1:35 PM (in response to Dan Bracuk)There might be something here that can help - http://javascript.internet.com/page-details/mouse-coordinates.html -
2. Re: X and Y Co-ordinates
Newsgroup_User Jul 21, 2006 3:28 PM (in response to Dan Bracuk)For layouts using CSS
.style.top
.style.left
.style.bottom
.style.right
For IE browsers there is stuff like this IIRC
.offsetTop
.offsetLeft
.offsetBottom
.offsetRight
Dan Bracuk wrote:
> After much googling and trial and especially error, I'll pose the question
> here. How do I retrieve the x and y co-orindates of something on a web page.
> Assuming that abc is the id of a <span>, <div> or <input>, how do I get the
> following js function to work?
>
> function init(){
> xPos= document.getElementById("abc").whatGoesHere?;
> window.alert("xPos is " + xPos );
> return true;
>
>



