From: Mike on
I am using onMouseMove events to pass event to a function.
ex.
onMouseMove = "myApp(event);"

In the function I have been using clientX and Y but they do not work
over IFrames. So I tried screenX and Y. This seems to work very nicely
(I do not need to worry about screen scrolling because I "lock" the
screen down).

ex.
function myApp(evnt) {
CurX = evnt.screenX;
CurY = evnt.screenY;
}
Is there a compatibility issue I should be aware of using screenX and
screenY? Or some other problem?

Thanks
Mike
From: Mike on
Sorry I forgot to mention that I am also calling the parent window's
myApp on the iframe document's onMouseMove.
So it is like this...
Parent window:
function myApp(evnt) {
CurX = evnt.screenX;
CurY = evnt.screenY;
}

<body onMouseMove = "myApp(event);">


Child document (in parent window's IFrame):
function childMyApp(evnt) {
parent.myApp(evnt);
}

<body onMouseMove = "childMyApp(event);">

using the screenX and Y in the parent function seems to work to keep
all the coordinates working without any calculations. Using clientX
and Y do not do this.

So again (now that I made it clearer - I hope),
is this ok? Is there some issue I should know about?

Thanks


On Wed, 28 Apr 2010 20:25:32 -0400, Mike <no_please(a)not.com> wrote:

>I am using onMouseMove events to pass event to a function.
>ex.
>onMouseMove = "myApp(event);"
>
>In the function I have been using clientX and Y but they do not work
>over IFrames. So I tried screenX and Y. This seems to work very nicely
>(I do not need to worry about screen scrolling because I "lock" the
>screen down).
>
>ex.
>function myApp(evnt) {
> CurX = evnt.screenX;
> CurY = evnt.screenY;
>}
>Is there a compatibility issue I should be aware of using screenX and
>screenY? Or some other problem?
>
>Thanks
>Mike