javascript iframe not resizing on browser load

K

Kuv patel

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
 
F

Felbrigg

try is server side


IFRAMEID.Attributes.Add("height", "380")

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

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top