Mouse coordinates for Explorer in Javascript
<p>I am testing our new website app at the moment. It was developed using Firefox for testing and works as expected in Firefox, Safari and Chrome. When it comes to Explorer there is a reasonably crucial Javascript function giving up and it looks to be around the x and y mouse coordinates. The function controls adding a diary graphic so the screen position is used to place the graphic and calculate the date and time to send to the server PHP. The calculations failing use the code below to find the mouse position and the window scroll position.</p>

<pre><code>var x = event.clientX;
var y = event.clientY;


var xScroll = window.pageXOffset;
var yScroll = window.pageYOffset;
</code></pre>

<p>I have looked around and found various answers but a lot is quite old so can anybody advice me how to retrieve these values in IE 7, 8 and 9 and a good if statement to work out that it's IE 7, 8 or 9.</p>
