Results 1 to 4 of 4

Thread: How to use document.body.innerHTML

  1. #1
    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"

  2. #2
    Join Date
    Apr 2008
    Posts
    2,572

    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")

  3. #3
    Join Date
    May 2008
    Posts
    2,792

    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;

  4. #4
    Join Date
    Oct 2005
    Posts
    2,358

    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

Similar Threads

  1. How to convert HP Jetsuite Document to PDF Document
    By Li-One in forum Hardware Peripherals
    Replies: 4
    Last Post: 01-02-2012, 02:09 PM
  2. Blank word document opens while opening original document
    By Loyalpalm in forum Windows Software
    Replies: 6
    Last Post: 02-12-2011, 12:27 AM
  3. Replies: 5
    Last Post: 26-03-2010, 06:53 AM
  4. Replies: 6
    Last Post: 13-09-2009, 05:04 PM
  5. javascript "innerHTML" cannot resolve
    By Pikachoo in forum Software Development
    Replies: 3
    Last Post: 05-03-2009, 10:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,130,758.96211 seconds with 16 queries