javascript iframe not resizing on browser load

  • Thread starter Thread starter Kuv patel
  • Start date Start date
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
 
try is server side


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

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