Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need way to continuously monitor mouse position 1

Status
Not open for further replies.

UCENwebster

Programmer
Jun 7, 2002
18
US
I have a script that needs to know the coordinates of the mouse every half second, like this:

setInterval( 'CheckMouseXY()', 500);

But I only know how to check the mouse coordinates using an event object:

event.screenX or event.screenY

What I need is a way to check the mouse without using a preexisting event. It needs to be IE4 and NN6 compatible, too. Any suggestions?
 
hi UCENwebster,

here's an example:
[tt]
<script name=&quot;javascript&quot;>
window.document.onmousemove = function(e){window.status = (e)?e.pageX:event.x;};
</script>
[/tt]

this example simply reports the mouse X coordinate in the status bar anytime the mouse is moved. is this similar to what you want?
=========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top