473,657 Members | 3,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

iframe resizing.

1 New Member
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...
parent.doc1div. doc1frame.style .height="300";

I think. not sure.

Document 1.
[HTML]<html>
<head>
<title>doc1</title>
</head>
<body>
<div id="doc1div" height='500'></div>
<script type="text/javascript">
document.getEle mentById('doc1d iv').innerHTML = "<iframe id='doc1frame' src='doc2.html' frameborder='no ' width='1000' height='40' scrolling='no' allowtransparen cy='true' background-color='transpar ent'></iframe>";
</script>
<!-- other doc1 content -->
</body>

Document 2
<html>
<head>
<script type="text/javascript">
<!--
window.onload=s howDoc2;
function showDoc2()
{
if (document.getEl ementById(id);)
{
parent.doc1div. style.height="3 00";
}
else
{
parent.doc1div. style.height="4 0";
}
}
-->
</script>
</head>

<body>
<div id="doc2div1" z-index:500 position=absolu te>
<dl><dt onMouseOver="ja vascript:showDo c2();">
<!-- content -->
</dt></dl></div>
</body>
</html>[/HTML]
Aug 12 '08 #1
1 1535
acoder
16,027 Recognized Expert Moderator MVP
Use document.getEle mentById() 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

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

Similar topics

3
9299
by: Catherine Lynn Smith | last post by:
I want to know the recommended way to handle scripting of/with containers such as an iframe. I have a page with border-navigation bars on the top/bottom/left/right and I want to use an iframe to load content in the middle. I would like, if possible, to have the parent window resize itself to suit whatever is loaded into the iframe container, deriving the size needed from calculated values. Thus the calculation would have to over-ride...
4
1951
by: khothikhe | last post by:
can some one help me here coz this is really killing me! the problem is, i have this javascript code in my aspx page that i want it to work on almost all browsers, especially opera and safari : function resize(){ displayFrm = document.getElementById("ifrmDisplay"); innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument : displayFrm.contentWindow.document;
1
2381
by: khothikhe | last post by:
Can someone help me here because this is really killing me! the problem is, i have this javascript code in my aspx page that i want it to work on almost all browsers, especially opera and safari : function resize(){ displayFrm = document.getElementById("ifrmDisplay"); innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument : displayFrm.contentWindow.document;
5
1749
by: Paul Fi | last post by:
Can someone help me here because this is really killing me! the problem is, i have this javascript code in my aspx page that i want it to work on almost all browsers, especially opera and safari : function resize(){ displayFrm = document.getElementById("ifrmDisplay"); innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument : displayFrm.contentWindow.document;
1
1772
by: Paul Fi | last post by:
I have this problem with iframes: i want to resize iframe's height when the window inside the frame is resized or when the src attribute of iframe changes so make the height of iframe equal to the size window's body scrollHeight so that way i dont need any scrolls for my iframe but the let page containing the iframe do the scrolling for the iframe so how can i make that happen, is one of the iframe events does detect any changes to...
3
4479
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and so that the music doesn't reload each time a page is switched. There is another javascript to resize...
1
10378
by: Dave | last post by:
Usual apologies if this is old territory. I'm resizing a bunch of iframes on a page to the height of their contained documents. Some of the contained documents contain IMG tags. On IE this doesn't cause a problem and the resize works correctly. On Firefox, if an image extends below the last line of text in the document, that bit gets chopped off. In other words, the returned document height doesn't allow for the image. My code for...
1
8123
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible to gradually zoom an iframe, and if so, what am I missing? Here is the script I am trying to manipulate, between the head tags: <script language=JavaScript> /**** adjust these two parameters to control how fast or slow
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.