DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: HTML Source from a Web Browser or HTMLDocument Object

  1. #1
    Andy Smith Guest

    HTML Source from a Web Browser or HTMLDocument Object


    Any ideas how I can get hold of the FULL HTML source from a document loaded
    into a Web Browser Control. The document has a lot of data inserted into
    it during the load so I'd only want to do it once and I'd like to see if
    I can hold the HTML and load on demand from a string.

    Cheers

  2. #2
    Phil Weber Guest

    Re: HTML Source from a Web Browser or HTMLDocument Object

    > Any ideas how I can get hold of the FULL HTML source
    > from a document loaded into a Web Browser Control?


    Andy: Try this...

    Dim objDoc As HTMLDocument

    Set objDoc = webBrowser.Document
    sHTML = objDoc.getElementsByTagName("html").Item(0).outerHTML

    ---
    Phil Weber



  3. #3
    andy smith Guest

    Re: HTML Source from a Web Browser or HTMLDocument Object


    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > Any ideas how I can get hold of the FULL HTML source
    > > from a document loaded into a Web Browser Control?

    >
    >Andy: Try this...
    >
    > Dim objDoc As HTMLDocument
    >
    > Set objDoc = webBrowser.Document
    > sHTML = objDoc.getElementsByTagName("html").Item(0).outerHTML
    >
    >---
    >Phil Weber
    >
    >



    Cheers Phil,

    First time I have used the forum. Will now stop banging my head against a
    brick wall and use it more often

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center