div onMouseOver doesn't trigger in iframe

  • Thread starter Bart van Deenen
  • Start date
B

Bart van Deenen

Hi

My program has a sort of dynamic popup when hovering over an icon. It
uses an iframe with visibility:hidden, and an onload handler to make it
visible after the server replies.

The Contents of the iframe is dynamically generated, but mainly it's a
small valid html file. Now I want to have an onMouseOver handler in the
main div of the iframe, but the mouseover event just isn't fired. When I
put the same onMouseOver statement in an <a> in the iframe, it is just
fine.

My Javascript bible claims that onMouseOver should trigger on all
elements that occupy space on the screen.

Should I look for my a bug in my own stuff, or is this a known browser
issue (both Firefox and Safari)?

Thanks

Bart
 
B

bumbleguppy

In the html document inside the iframe, try referencing the "parent"
object.

The parent is the source of the visibility, not the document in the
iframe.

<script type="text/javascript">
window.onload=function(){
if(parent){
parent.makeThisIframeVisibleFunction();
}
}
 
R

RobB

Bart said:
Hi

My program has a sort of dynamic popup when hovering over an icon. It
uses an iframe with visibility:hidden, and an onload handler to make it
visible after the server replies.

The Contents of the iframe is dynamically generated, but mainly it's a
small valid html file. Now I want to have an onMouseOver handler in the
main div of the iframe.....

100 pts. for this:
...but the *mouseover event* just isn't fired.

Go to the head of the terminology class, my friend.

When I
put the same onMouseOver statement in an <a> in the iframe, it is just
fine.

My Javascript bible claims that onMouseOver should trigger on all
elements that occupy space on the screen.

Should I look for my a bug in my own stuff, or is this a known browser
issue (both Firefox and Safari)?

Thanks

Bart

As the Good Book says, there is no reason why a div in a document
should no sport an active onmouseover handler, as those links do. Could
you post a sample of that generated HTML?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top