title: clientX, clientY javascript not working as expected in Internet Explorer
body: <p>I have a web page that displays a message when a user moves their mouse out of the page.  Everything works perfectly in all browsers except Internet Explorer.  In Internet Explorer, my code works, unless the user clicks on a form select item.  When the user chooses an item from the drop down list, clientX and clientY report an incorrect value, which makes my message display as if the user moved their mouse outside of the page.  The message should only display when the mouse actually goes outside of the page.  I am already using a work around for older versions of IE.  Does anyone know a different way of approaching this problem so that the code works correctly in older IE browsers (7-8)?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>if (document.addEventListener) {
      window.addEventListener("mouseout", popMessage, false);
  } else {  // IE before version 9
      document.attachEvent ('onmouseout', popMessage);
  }
  
  .
  .
  .
  .
  
  var mouseX = 0;
  var mouseY = 0;
  
  function popMessage (e) {
      mouseX = e.pageX;
      mouseY = e.pageY;
  
      if ('pageX' in e) { // all browsers except IE before version 9
          var mouseX = e.pageX - document.documentElement.scrollLeft;
          var mouseY = e.pageY - document.documentElement.scrollTop;
      }
      else {  // IE before version 9
          mouseX = e.clientX + document.documentElement.scrollLeft;
          mouseY = e.clientY + document.documentElement.scrollTop;
      }
  
      if ((mouseY &lt; 0 || mouseY &gt; window.innerHeight-1)
      ||  (mouseX &lt; 0 || mouseX &gt; window.innerWidth-1))
      {
          abandonPanel.show();
          // alert("x:" + mouseX + "  y:" + mouseY + "  innerHeight:" + window.innerHeight + "  innerWidth:" + window.innerWidth);
  
          if (document.addEventListener) {
              window.removeEventListener("mouseout", popMessage, false);
          } else {  // IE before version 9
              document.detachEvent ('onmouseout', popMessage);
          }
      }
  }
  </code></pre>