Results 1 to 4 of 4

Thread: webbrowser control, getting source

  1. #1

    Thread Starter
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    webbrowser control, getting source

    why does
    Code:
    Clipboard.SetText web1.Document.documentelement.innerhtml
    return just what's between the HEAD tags, and
    Code:
    Clipboard.SetText web1.Document.body.innerhtml
    gives me a "object variable or with block variable not set" error. I'm trying to retrieve what's between the BODY tags of the webpage in my webbrowser control. Little help?
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  2. #2
    Matthew Gates
    Guest
    This should work.


    Code:
    Clipboard.Clear
    Clipboard.SetText WebBrowser1.Document.documentElement.innerHTML

  3. #3
    Matthew Gates
    Guest
    Oh yeah, the reason why you get an error is because you have to navigate to a web page first.

  4. #4

    Thread Starter
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    Nothing's changed: I navigate to a webpage first, and when I use
    WebBrowser1.Document.documentElement.innerHTML
    I only get from the <HEAD> to the </HEAD>
    When I use
    WebBrowser1.Document.Body.innerHTML
    I recieve the previously mentioned error.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width