detect a onmouseout on IFRAME

detect a onmouseout on IFRAME

Post by Allar » Sat, 07 Feb 2004 02:58:39

I have an IFRAME showing a ctxmenu. I want to detect the event that the
mouse goes out of the IFRAME. (to set a timer to automatically close the

In IE I can test : event.toElement on the document.onmouseout event. If
it is null then I know the mouse is moved out of the window.

What is the way to do this in Mozilla? It seems that the
document.onmouseout is not always triggered (when there are items
without any margin to the edge of the IFRAME).

Please help...

See a test page below:

<script language=javascript>
function handle_onload() {
if (navigator.appName!="Netscape") {
//' for IE browser
fraTest.document.onmouseout=function () {
if (!this.parentWindow.event.toElement) {
} else {
//' how ?!?!

<iframe id=fraTest name=fraTest></iframe>

<div id=spnMessages></div>

1. button and an iframe : onmouseout

2. DIV/IFRAME hide/show problem onMouseOut - please help :)

I have the following scritpt. It hides div layer when mouse is out of
the div layer. Inside DIV I have IFRAME box. Unfortuantely it does not
work in Mozilla or IE 5.5. It hides div when cursor is inside IFRAME.
NOte that IFRAME is inside DIV so it should not hide DIV. It Works
fine in IE6.0.

Could any one help?


<script type="text/javascript">
function hide() {
obj = document.getElementById('testDiv'); = 'hidden';
function show() {
obj = document.getElementById('testDiv'); = 'visible';
<form action="">
<input type="button" value="Show" onclick="show()">
<div id="testDiv" style="border: 10px solid red;" onmouseover="show()"
<p>Text inside DIV</p>
<iframe id="testIframe"></iframe>

3. Get form values from iframe (1) to iframe (2) inside a layer in iframe (1)

4. Reliably detect when an iframe has loaded?

5. Detect events in an editable iframe

6. Detect which IFrame is trying to change the top level document href/URL?

7. having trouble with event listener: detect iframe close event from parent

8. Detect Browser - switch to iframe or url as page loads

9. Detecting empty in an IFrame

10. How to detect which iframe is active

11. Detecting if an iframe's parent has finished loading

12. Detect page called in IFRAME

13. How to detect the change of TITLE element in nested IFRAME?

14. How to detect iframe's doc change/loading ?

15. Detecting right clic into the iframe