2 Replies Latest reply: Jul 21, 2006 3:28 PM by Newsgroup_User RSS

    X and Y Co-ordinates

    Dan Bracuk Community Member
      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;