View Full Version : getting an onmouse event working outside an iframe

06-15-2011, 03:46 PM
Hi all
I have a test page here (http://www.qsl.net/2d0drm/testframe.htm) I want the onmouse events to appear from the iframe onto the parent page.I found this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6506) but it doesn't really explain how to implement it. I would appreciate some help please.

Thanks if you can help.


06-15-2011, 08:25 PM
You can refer to the parent window by using "top" or "parent" for example:

window.top.location.href = "http://www.newlocationhere.com";
window.parent.location.href = "http://www.newlocationhere.com";

will give you the title of the page which contains the frame[s]. So if you need the "onmouse" to trigger an event on the parent or top page you can refer to the method or action by either one of these. Hope this helps.