title: javascript clientY
body: <p>I am trying to make a div container show where my mouse is when a user mousesover a text link, but in Internet Explorer the position is different than in Firefox using the latest versions of ff and ie. Is there some new way to make a different script for these two browsers or are they going to make them the same. Right now client Y is different in the two browsers as to where the div shows up compared to the text that is moused over. I am using</p>
  
  <pre><code>&lt;!--[if !IE]&gt;&lt;!--&gt;
  &lt;p&gt;not ie&lt;/p&gt;
  &lt;!--&lt;![endif]--&gt;
  </code></pre>
  
  <p>Am i not using this right? It says not ie in internet explorer. How do I make it so I can make clientY different in one browser than the other? this is what my javascript looks like</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
              function closePopup(div_id) {
                  var el = document.getElementById(div_id);
              }
              function toggle(div_id, height) {
                  var el = document.getElementById(div_id);
  
                  if ( el.style.display == 'none' ) { 
                      el.style.display = 'block';
  
              }
              function getX(event) {
                  var x = event.clientX;
                  return x;
              }
              function getY(event) {
                  var y = event.clientY;
                  return y;
              }
              function window_pos(element, x, y, width, height) {
                  var el = document.getElementById(element);
                  el.style.position = "absolute";
                  el.style.left = ""+setX(x-parseInt(width, 10)/2)+"px";
                  el.style.top = ""+setY(y-parseInt(height, 10)/2, height)+"px";
              }
              function setX(x) {
                  return window.pageXOffset+x;
              }
              function setY(y, h) {
                  return window.pageYOffset+y-parseInt(h);
              }
              function popup(element, event) {
                  var el = document.getElementById(element);
                  var width = el.style.width;
                  var height = el.style.height;
                  var positiona = [];
                  window_pos(element, getX(event), getY(event), width, height);
                  toggle(element, height);     
              }
          &lt;/script&gt;
  </code></pre>