Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to capture MouseMove even over IFrames?

1,843 views
Skip to first unread message

MikeJ

unread,
Apr 21, 2010, 8:32:20 PM4/21/10
to
I am currently using onMouseMove in the body of the parent document.
How can I continue to capture the onMouseMove even when the mouse is
over the IFrame area? I know I could simply write the functions into
the child document but I really need to keep to using the same
functions and accessing the save vars.

Thanks
Mike

MikeJ

unread,
Apr 21, 2010, 8:45:48 PM4/21/10
to
Just wanted to mention that like I said I would like to be able to use
the parent's functions, BUT - I know I can use
top.PARENT_WINDOW'S_FUNCTION();
this would mean having to check to see who is triggering the event and
then recalc for the offset in the X and Y (since it would be the X and
Y for the child document). Is there anyway to just trigger the parrent
document's functions and use the parent document's coordinates?

On Wed, 21 Apr 2010 20:32:20 -0400, MikeJ <no_spam...@nothere.com>
wrote:

nick

unread,
Apr 21, 2010, 8:59:07 PM4/21/10
to
On Apr 21, 8:45 pm, MikeJ <no_spam_ple...@nothere.com> wrote:
> ...

> Is there anyway to just trigger the parrent
> document's functions and use the parent document's coordinates?

You could always position a 0-opacity div above the iframe, track
mouse coordinates with it, and get it out of the way on mouse down,
allowing the event to get to the iframe. It's a little hacky but it
should work...

MikeJ

unread,
Apr 21, 2010, 9:10:39 PM4/21/10
to
That is a very clever idea. If I (or another poster) can't figure out
how to do it - I will certainly try that. Thanks.

On Wed, 21 Apr 2010 17:59:07 -0700 (PDT), nick <nic...@fastmail.fm>
wrote:

0 new messages