<html><div style='background-color:'><DIV class=RTE>
<P>Hi Emmanuel,</P>
<P>This seems to work, but gives slightly different co-ordinates in IE than in Firefox.</P>
<P>Is this because the method you gave me was for IE, and Firefox uses a slightly different one?</P>
<P>Thanks again for your help.<BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
<DIV></DIV>From: <I>Emmanuel <emmanuel@quomodo.com></I><BR>Reply-To: <I>"\[JavaScript List\]" <javascript@LaTech.edu></I><BR>To: <I>"[JavaScript List]" <javascript@LaTech.edu></I><BR>Subject: <I>Re: [Javascript] X and Y co-ordinates of an object</I><BR>Date: <I>Mon, 26 Feb 2007 17:26:27 +0100</I><BR>>At 3:58 PM +0000 2/26/07, Alan Easton wrote:<BR>>>function getbasket() {<BR>>> var x=document.getElementById("basket").x;<BR>>> var y=document.getElementById("basket").y;<BR>>> alert("x: "+ x +" y: "+ y +"");<BR>>>}<BR>><BR>>I would try:<BR>><BR>>function getbasket() {<BR>> var x=document.getElementById("basket").offsetLeft;<BR>> var y=document.getElementById("basket").offsetTop;<BR>> alert("x: "+ x +"
y: "+ y +"");<BR>>}<BR>><BR>>However, expect those to return undefined if the div is invisible <BR>>(style.display set to "none").<BR>><BR>>Emmanuel<BR>>_______________________________________________<BR>>Javascript mailing list<BR>>Javascript@LaTech.edu<BR>>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></FONT></BLOCKQUOTE></div><br clear=all><hr>Exclusive Ed Byrne daily comedy clips on <a href="http://g.msn.com/8HMBENUK/2728??PS=47575" target="_top">MSN Video</a> </html>