one more try 
Author Message
 one more try

Maybe I am reading your question wrong, but you are retrieving the entire HTML document header, body and all into the htmlstring variable.  Just to make sure do the following:
public function DownloadHTML( byval href as string) as HTMLDocument
    dim htmlString as string
    htmlstring = inet1.openurl( href, icString)
    debug.print htmlstring
end function
You will see that you have the entire page.
So your problem is not retrieving the text of a web page, your problem is what you do with the text once you retrieve it.  You are placing the text into the body of another page.  I would place it into the OuterHTML property of the HTML tag not the body tag.

Matthew Arnheiter

  I'm sorry - this is such an annoying problem for me that I feel I must repost over and over until I get an answer <grin>

  Can anyone fill in this function? (using the webbrowser control, the internet transfer control, or any api functions)  The only constraint is that IMAGES CAN'T BE DOWNLOADED.

  public function DownloadHTML( byval href as string) as HTMLDocument
      ...
  end function  

  This is the closest I've come, but it only gets the body of the html, and I want ALL of it -

  public function DownloadHTML( byval href as string) as HTMLDocument
      dim htmlString as string
      dim htmlDoc as htmlDocument
      htmlstring = inet1.openurl( href, icString)
      set htmldoc = new htmldocument
      htmldoc.open
      htmldoc.close
      htmldoc.body.innerhtml = htmlstring
      set downloadhtml = htmldoc
  end function



Sat, 18 May 2002 03:00:00 GMT  
 one more try

I'm sorry - this is such an annoying problem for me that I feel I must repost over and over until I get an answer <grin>

Can anyone fill in this function? (using the webbrowser control, the internet transfer control, or any api functions)  The only constraint is that IMAGES CAN'T BE DOWNLOADED.

public function DownloadHTML( byval href as string) as HTMLDocument
    ...
end function  

This is the closest I've come, but it only gets the body of the html, and I want ALL of it -

public function DownloadHTML( byval href as string) as HTMLDocument
    dim htmlString as string
    dim htmlDoc as htmlDocument
    htmlstring = inet1.openurl( href, icString)
    set htmldoc = new htmldocument
    htmldoc.open
    htmldoc.close
    htmldoc.body.innerhtml = htmlstring
    set downloadhtml = htmldoc
end function



Sun, 19 May 2002 03:00:00 GMT  
 one more try

From the example below, you will only get the HTML.
A browser does the same, then parses the document, then loads the images, then displays the whole lot.

Quote:
> using the webbrowser control, ...

You must have slipped somewhere.
If you want the whole lot, use the IE control (webbrowser control), it downloads everything, as your browser will.  From VB, you have access to the webbrowser.Document, which contains the images collection.

  I'm sorry - this is such an annoying problem for me that I feel I must repost over and over until I get an answer <grin>

  Can anyone fill in this function? (using the webbrowser control, the internet transfer control, or any api functions)  The only constraint is that IMAGES CAN'T BE DOWNLOADED.

  public function DownloadHTML( byval href as string) as HTMLDocument
      ...
  end function  

  This is the closest I've come, but it only gets the body of the html, and I want ALL of it -

  public function DownloadHTML( byval href as string) as HTMLDocument
      dim htmlString as string
      dim htmlDoc as htmlDocument
      htmlstring = inet1.openurl( href, icString)
      set htmldoc = new htmldocument
      htmldoc.open
      htmldoc.close
      htmldoc.body.innerhtml = htmlstring
      set downloadhtml = htmldoc
  end function



Sun, 19 May 2002 03:00:00 GMT  
 one more try

Hi Darren

Well if you just want the html from a web page then the following works fine..

Dim htmlString As String
Dim href As string

href  =  "http://www.sharkyextreme.com/"
htmlString = Inet1.OpenURL(href, icString)

This brings back all the html for that page. If you're trying to do something different, let me know and I'll have a look.

Sean

  I'm sorry - this is such an annoying problem for me that I feel I must repost over and over until I get an answer <grin>

  Can anyone fill in this function? (using the webbrowser control, the internet transfer control, or any api functions)  The only constraint is that IMAGES CAN'T BE DOWNLOADED.

  public function DownloadHTML( byval href as string) as HTMLDocument
      ...
  end function  

  This is the closest I've come, but it only gets the body of the html, and I want ALL of it -

  public function DownloadHTML( byval href as string) as HTMLDocument
      dim htmlString as string
      dim htmlDoc as htmlDocument
      htmlstring = inet1.openurl( href, icString)
      set htmldoc = new htmldocument
      htmldoc.open
      htmldoc.close
      htmldoc.body.innerhtml = htmlstring
      set downloadhtml = htmldoc
  end function



Sun, 19 May 2002 03:00:00 GMT  
 one more try

thanx sean - but if you look, they are actually the first few lines in my procedure. The problem, if I use the internet transfer control, is getting it into the form of a htmlDocument object - I don't want to do the HTML parsing myself!

------------------


  Hi Darren

  Well if you just want the html from a web page then the following works fine..

  Dim htmlString As String
  Dim href As string

  href = "http://www.sharkyextreme.com/"
  htmlString = Inet1.OpenURL(href, icString)

  This brings back all the html for that page. If you're trying to do something different, let me know and I'll have a look.

  Sean

    I'm sorry - this is such an annoying problem for me that I feel I must repost over and over until I get an answer <grin>

    Can anyone fill in this function? (using the webbrowser control, the internet transfer control, or any api functions)  The only constraint is that IMAGES CAN'T BE DOWNLOADED.

    public function DownloadHTML( byval href as string) as HTMLDocument
        ...
    end function  

    This is the closest I've come, but it only gets the body of the html, and I want ALL of it -

    public function DownloadHTML( byval href as string) as HTMLDocument
        dim htmlString as string
        dim htmlDoc as htmlDocument
        htmlstring = inet1.openurl( href, icString)
        set htmldoc = new htmldocument
        htmldoc.open
        htmldoc.close
        htmldoc.body.innerhtml = htmlstring
        set downloadhtml = htmldoc
    end function



Mon, 20 May 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. One last try....

2. Does any one ever try *.res (Resource File)

3. One more try ...

4. One more try: InfoZip

5. one more try

6. A different one to try!

7. one more try

8. XML HTTP question...one more try

9. one more try

10. One more try - Accessing Parallel port on a network

11. One last try to get the correct attached file

12. How to group on records but . . .(one last try)

 

 
Powered by phpBB® Forum Software