title: How can I get the X and Y position of a CELL in a table on click?
body: <p>Simple sounding one but cant find the solution : </p>
  
  <p>I have a dynamically generated table (ie so I will never know beforehand how many rows, how high they are, etc etc. ). I have one cell with a button image in it. When I click on the image, I want to get the absolute x and y positions of the top and right values for the button i just clicked. </p>
  
  <p>the reason for this is I have another div that i want to reposition to line up with the row that was just clicked on.</p>
  
  <p>I've already tried creating a click handler for the cell and then using .getAttribute("left") in javascript but that comes back as null.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;td id="test1" onclick="multi(this)"&gt;
  </code></pre>
  
  <p>and the following in my js section :</p>
  
  <pre><code>function multi(buttonClicked) {
  
  var posY = buttonClicked.getAttribute("top");
  
  alert(posY);
  
  }
  </code></pre>