title: How to get mouse pointer position using javascript for internet explorer?
body: <p>I am developing a web page where I have set an image in a <code>&lt;div&gt;</code> dynamically.
  It works in Firefox but it fails in IE.</p>
  
  <p>The question is: how to get mouse pointer position in IE?
  I am using the following code for getting mouse pointer position</p>
  
  <pre><code>function getCursorXY(e) {   
      CurX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
      CurY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
  }
  </code></pre>
  
  <p>It works fine with Firefox.</p>