How to use document.body.innerHTML
I am using a HTML language to develop a website. I am getting a lot of errors while executing the tags. I am using Internet Exlporer 6 to view those web pages. The first thing when i try to view the page in the browser the images and the hyperlinks are not working. I am also getting innerHTML cannot found the object error. What are correction i will need to make. And what are the ways to use HTML tag "document.body.innerHTML"
Re: How to use document.body.innerHTML
I am giving below a example of codes. Try to figure out by comparing your HTML tags with mine. You will understand that why you are getting the error.
HTML Code:
$oIE = New-Object -COM InternetExplorer.Application
$oIE.navigate("about:blank")
while ($oIE.busy) { sleep 1 }
$oIE.visible = $true
$html="<html><head></head><body>Hello World!</body></html>"
$oIE.document.IHTMLDocument2_write("$html")
#$oIE.document.write("$html")
Re: How to use document.body.innerHTML
You will need to check out your complete tags once again. It is possible that you had some common errors while editing the tags. Just check the complete script one more time. If it is perfect then try this, try to changing your document.body.innerHTML to document.frames['test'].body.innerHTML; and to:
document.body.frames['test'].innerHTML;
Re: How to use document.body.innerHTML
I am giving the solution below for the problem which occurred to me. You can see the tags and figure it out whether where can be issue. It is quiet important that you must recheck all your tags. Other wise just review the below quotes:
HTML Code:
<script type="text/javascript">
//<![CDATA[
onload = function()
{
alert(frames['foo'].document.body.innerHTML);
}
//]]>
</script>
<iframe src="test.html" name="foo"></iframe>
By looking in the above example you will get an idea that how to give the tag document.body.innerHTML