By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,770 Members | 1,393 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,770 IT Pros & Developers. It's quick & easy.

div onMouseOver doesn't trigger in iframe

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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();
}
}

Jul 23 '05 #2

P: n/a
Bart van Deenen wrote:
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?

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.