inside div element find out mouse position?
<p>i done one concept of  program is find out mouse coordinate position inside div element ... its perfectly working in IE browser only but i cant get answer in mozilla firefox... what is the reason?????????? </p>

<pre><code> &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd"&gt;

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Cursor position status display&lt;/title&gt;
&lt;script type="text/javascript"&gt;

 function getXOffset(e){
if(typeof e.offsetX != 'undefined')
  return e.offsetX;
 else if(typeof e.pageX != 'undefined')
  return e.pageX - e.target.offsetLeft;
}

function getYOffset(e){
 if(typeof e.offsetY != 'undefined')
  return e.offsetY;
   else if(typeof e.pageY != 'undefined')
  return e.pageY - e.target.offsetTop;
}

function displayOffsets(e){
e = (e) ? e : window.event;
window.status = 'x: '+getXOffset(e)+'   y: '+getYOffset(e); 
}

 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
  &lt;div style="width:100px; height:300px;margin:50px 0 0 500px;border:1px solid red;" &gt;
  &lt;div onMouseMove="displayOffsets(event)" style="width:50px; height:300px;     background:#669966;"&gt;&lt;/div&gt;
  &lt;div &gt;
  &lt;/body&gt;
   &lt;/html&gt;
</code></pre>
