Please Help!!
Everytime I access the page below .. i get the following error :
"'document.getElementById(...).contentWindow.document.body' is null or not an object"
The page is as below: Its simple .. I am just trying to put some stuff in an editable iframe.
<HTML>
<HEAD>
<TITLE>Title</TITLE>
</HEAD>
<%
someInput = "<p>asa asa sa sas <b>asa</b> sa <i>sas a sa</i>sa a a sas a</p>"
%>
<BODY>
<FORM name = "formName"
method = "POST"
action = "">
<iframe src = "some.asp"
id = "frmName"
WIDTH = "100%"
HEIGHT = "200PX"
onload = "doIt()">
</iframe>
<script language="JavaScript">
function doIt()
{
frames.frmName.document.designMode = 'On';
document.getElementById('frmName').contentWindow.document.body.innerHTML = "<%= someInput %>";
}
</script>
</FORM>
</BODY>
</HTML>
Everytime I access the page below .. i get the following error :
"'document.getElementById(...).contentWindow.document.body' is null or not an object"
The page is as below: Its simple .. I am just trying to put some stuff in an editable iframe.
<HTML>
<HEAD>
<TITLE>Title</TITLE>
</HEAD>
<%
someInput = "<p>asa asa sa sas <b>asa</b> sa <i>sas a sa</i>sa a a sas a</p>"
%>
<BODY>
<FORM name = "formName"
method = "POST"
action = "">
<iframe src = "some.asp"
id = "frmName"
WIDTH = "100%"
HEIGHT = "200PX"
onload = "doIt()">
</iframe>
<script language="JavaScript">
function doIt()
{
frames.frmName.document.designMode = 'On';
document.getElementById('frmName').contentWindow.document.body.innerHTML = "<%= someInput %>";
}
</script>
</FORM>
</BODY>
</HTML>