Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 18-05-2009
Member
 
Join Date: May 2009
Posts: 24
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"
Reply With Quote
  #2  
Old 18-05-2009
Member
 
Join Date: Apr 2008
Posts: 2,567
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")
Reply With Quote
  #3  
Old 18-05-2009
Member
 
Join Date: May 2008
Posts: 2,786
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;
Reply With Quote
  #4  
Old 18-05-2009
Member
 
Join Date: Oct 2005
Posts: 2,357
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use document.body.innerHTML"
Thread Thread Starter Forum Replies Last Post
How to convert HP Jetsuite Document to PDF Document Li-One Hardware Peripherals 4 01-02-2012 02:09 PM
Blank word document opens while opening original document Loyalpalm Windows Software 6 02-12-2011 12:27 AM
What are Document Assembly and Document security supported in the Open XML Format? MarceloQuad Windows Software 5 26-03-2010 06:53 AM
Msi error while opening a document in Document Viewer Delil MediaCenter 6 13-09-2009 05:04 PM
javascript "innerHTML" cannot resolve Pikachoo Software Development 3 05-03-2009 10:06 AM


All times are GMT +5.5. The time now is 04:13 AM.