Web Analytics Made Easy -
StatCounter Mouse Coordinates - CodingForum

Announcement

Collapse
No announcement yet.

Mouse Coordinates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mouse Coordinates

    I have looked all over, and found plenty of scripts that tell you the mouse coordinates while your cursor is in the window. But what I really want, is a script that tells me the mouse coordinates whether the cursor is in the window or not. Any one know if this is possible?

  • #2
    you can just do something like this....It will set a variable which you could check for in whatever you are doing

    <html>
    <head>
    <script>
    function MouseLoc(X){
    MouseLocated=X;
    //1==In the Window
    //2==Out of Window
    }
    </script>
    </head>
    <body onmouseover="MouseLoc(1)" onmouseout="MouseLoc(0)">
    </body>
    </html>
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment


    • #3
      Thanks A1ien51, that did the trick.

      Comment

      Working...
      X