Hi all
I have a document in an iframe. This document is part of an application that resides in a directory beneath the main directory containing the page with the iframe on it i.e.:
test.site.com
- mypage.asp
MyDirectory
- mydocument.aspx
I have the following code on mypage.asp:
and the following code in the body tag of mydocument.aspx:
The resizeToContent() function is as follows:
The code is giving a Permission Denied error on the line:
var y =this.document.body.scrollHeight;
I understand that there are security settings in IE for scripting across frames and I have tried to set the document.domain property for both the asp and the aspx page - it gives me the same Permission Denied error in the aspx page...
Can anyone help me with this, please?
Thanks as always
Craftor
I have a document in an iframe. This document is part of an application that resides in a directory beneath the main directory containing the page with the iframe on it i.e.:
test.site.com
- mypage.asp
MyDirectory
- mydocument.aspx
I have the following code on mypage.asp:
Code:
<form action="" method="post" name="frmMain" ID="frmMain">
<table width="100%" border="0" ID="Table1" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="100%" height="100%">
<iframe src="MyDirectory/mydocument.aspx?user=<%=strEmail%>" frameborder="0" width="100%" height="100%" id="dynamIframe"></iframe>
</td>
</tr>
</table>
</form>
and the following code in the body tag of mydocument.aspx:
Code:
<body onload="resizeToContent();">
The resizeToContent() function is as follows:
Code:
function resizeToContent()
{
try
{
parent.document.getElementById("dynamIframe").style.height=0;
var x =0;
var y =this.document.body.scrollHeight;
while (x < y)
{
x+=1;
}
parent.document.getElementById("dynamIframe").style.height=x;
}
catch (o)
{
alert(o.message);
}
}
The code is giving a Permission Denied error on the line:
var y =this.document.body.scrollHeight;
I understand that there are security settings in IE for scripting across frames and I have tried to set the document.domain property for both the asp and the aspx page - it gives me the same Permission Denied error in the aspx page...
Can anyone help me with this, please?
Thanks as always
Craftor