473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

javascript iframe not resizing on browser load

Hi

I am displaying a page inside an Iframe, and I would like to enlarge the
iframe window to the size of the browser when the browser window loads up.
In the onload event of the browser I am calling javascript to do this and it
works ok for ie.6.0 but not 5.5.
Here's the script
function resizeIFrame()
{
var oBody = PrintedLeaflet.document.body;
var oFrame = document.getElementById("PrintedLeaflet");

oFrame.height = oBody.scrollHeight + (oBody.offsetHeight -
oBody.clientHeight);
oFrame.width = oBody.scrollWidth + (oBody.offsetWidth -
oBody.clientWidth);
oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight -
oBody.clientHeight);
oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth -
oBody.clientWidth);

}

Does anyone know why this script would not work in 5.5???

Thanks
Kuv

Nov 18 '05 #1
1 1399
try is server side
IFRAMEID.Attributes.Add("height", "380")

IFRAMEID.Attributes.Add("width", "710")

"Kuv patel" <kpatel@dsadasd> wrote in message
news:u3**************@TK2MSFTNGP11.phx.gbl...
Hi

I am displaying a page inside an Iframe, and I would like to enlarge the
iframe window to the size of the browser when the browser window loads up. In the onload event of the browser I am calling javascript to do this and it works ok for ie.6.0 but not 5.5.
Here's the script
function resizeIFrame()
{
var oBody = PrintedLeaflet.document.body;
var oFrame = document.getElementById("PrintedLeaflet");

oFrame.height = oBody.scrollHeight + (oBody.offsetHeight -
oBody.clientHeight);
oFrame.width = oBody.scrollWidth + (oBody.offsetWidth -
oBody.clientWidth);
oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight -
oBody.clientHeight);
oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth -
oBody.clientWidth);

}

Does anyone know why this script would not work in 5.5???

Thanks
Kuv

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Terry A. Haimann | last post by:
I have been working on creating a dynamic web page and have made slow but steady progress. What I have now has an opening page with two drop down boxes. Based on a choice from the first box, the...
3
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...
5
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have...
3
by: Shapper | last post by:
Hello, I am working on an ASP.NET/VB web site. I have several links including menu links. Considerer a want to load a page named page.aspx. I can do it using javascript. Or using this code:...
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
1
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...
7
by: kaer | last post by:
I have to send an XPath request on web page with JavaScript (with XMLHttpRequest) that has to be executed before. I have no idea on how to do that. Any pointer is welcome.
2
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.