[CODE=javascript]document.onclic k = getcoordinate;
var mosX = 0;
var mosY = 0;
function getcoordinate(e )
{
if (!e) var e = window.event;
mosX = e.clientX + document.body.s crollLeft;
mosY = e.clientY + document.body.s crollTop;
return true;
}
[/CODE]
-----
<body onclick="getcoo rdinate()">
-----
i'm trying this code to get mouse coordinates.
for 2 days i have read too many forum posts but could not succeed ....
this code works on IE but in Mozilla it does not work..
do i miss something?
var mosX = 0;
var mosY = 0;
function getcoordinate(e )
{
if (!e) var e = window.event;
mosX = e.clientX + document.body.s crollLeft;
mosY = e.clientY + document.body.s crollTop;
return true;
}
[/CODE]
-----
<body onclick="getcoo rdinate()">
-----
i'm trying this code to get mouse coordinates.
for 2 days i have read too many forum posts but could not succeed ....
this code works on IE but in Mozilla it does not work..
do i miss something?
Comment