Solved

track mouse location over an iframe

Posted on 2004-04-10
2
766 Views
Last Modified: 2012-05-04
Hello!

What I am trying to do is display a custom context menu when the user right clicks on an object within an iframe.  I want to display the menu on the parent and not within the iframe because it needs to show up on top of the iframe in case it is popped up next to the edge and gets lost underneath.

The problem is, i'm having trouble tracking the mouse coordinates from the parent when the mouse is over the iframe. event.clientY and event.clientX just give an error, and i tried storing the coordinates onmousemove but it always looses them when it rolls over the iframe, and the menu just pops up at the edge where the mouse was last tracked.

Is there any way to track the coordinates from the parent even when it's over the iframe?

thanks for any help!
-Scott
0
Comment
Question by:scottarius
2 Comments
 
LVL 25

Accepted Solution

by:
devic earned 300 total points
ID: 10799428
hi scottarius,

i uploded an example:
====================
http://home.arcor.de/athens/expexc/js/position/track_mouse_over_iframe/mainpage.html
0
 

Author Comment

by:scottarius
ID: 10799449
excellent!

that's two in one day you've helped me solve :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JQuery Syntax... 4 50
Possible propagation problem 1 34
Visual Studio npm 1 29
ASP get fieds value 2 20
Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question