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

iframe resizing.

P: 1
Have an issue with an iframe in FF blocking links in a z-index layer behind the layer containing the iframe. It works in IE. I can't change the layer index of the iframe because it's content needs to be on top all the time. Whenever the user mouseovers that iframe content it should expand to full size.

I haven't figured out how to change the height of the ifrmae from Doc2. It should be something like..."300";

I think. not sure.

Document 1.
<div id="doc1div" height='500'></div>
<script type="text/javascript">
document.getElementById('doc1div').innerHTML = "<iframe id='doc1frame' src='doc2.html' frameborder='no' width='1000' height='40' scrolling='no' allowtransparency='true' background-color='transparent'></iframe>";
<!-- other doc1 content -->

Document 2
<script type="text/javascript">
function showDoc2()
if (document.getElementById(id);)

<div id="doc2div1" z-index:500 position=absolute>
<dl><dt onMouseOver="javascript:showDoc2();">
<!-- content -->
Aug 12 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Use document.getElementById() to access elements. Just because you gave the element an ID doesn't mean you can access them by ID globally. IE's behaviour is incorrect here.
Aug 13 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.