R
Robert de Ridder
I use an asp page to display pages, where the dynamic content is in an
iframe.
To calculate the height of the iframe I use the calcheight function. However
when trying to do this with external pages, I get an access denied error,
and the iframe won't display correctly.
Is there a way to solve this or another way to calculate the height for the
iframe.
The relevant code displayed below.
Thanks in advance for any help,
Robert
function for calculating the height of the iframe:
function calcHeight()
{
//calculate height
var the_height=
document.getElementById('hoofdframe').contentWindow.
document.body.scrollHeight;
//minimal height of 600
if (the_height < 600) {the_height=600}
//change height
document.getElementById('hoofdframe').height=
the_height;
}
the iframe:
<iframe name="hoofdframe" id="hoofdframe" width="630" onload="calcHeight();"
src="<%=session("urlsessie")%>" scrolling="no" height="1"
frameborder="0"></iframe>
iframe.
To calculate the height of the iframe I use the calcheight function. However
when trying to do this with external pages, I get an access denied error,
and the iframe won't display correctly.
Is there a way to solve this or another way to calculate the height for the
iframe.
The relevant code displayed below.
Thanks in advance for any help,
Robert
function for calculating the height of the iframe:
function calcHeight()
{
//calculate height
var the_height=
document.getElementById('hoofdframe').contentWindow.
document.body.scrollHeight;
//minimal height of 600
if (the_height < 600) {the_height=600}
//change height
document.getElementById('hoofdframe').height=
the_height;
}
the iframe:
<iframe name="hoofdframe" id="hoofdframe" width="630" onload="calcHeight();"
src="<%=session("urlsessie")%>" scrolling="no" height="1"
frameborder="0"></iframe>