Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i get Html Code?
Message
From
04/12/2002 10:44:42
 
 
To
04/12/2002 03:37:13
Yan Kai On
Welkin System Ltd.
Tuen Mun, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
00729316
Message ID:
00729448
Views:
15
Kai On,

I've never used the Web Browser Control Foundation Class, but there are at least couple of ways to do it.
*&  Method 1, with a Form and a Web Browser ActiveX Control.
*&
*& GetHTML() Method.
LOCAL lcURL, lcHTML
*&
Thisform.oleWebBrowser.Navigate(lcURL)
DO WHILE NOT Thisform.oleWebBrowser.ReadyState = 4
     *&  Just a loop to wait until the page is fully loaded.
ENDDO
lcHTML = Thisform.oleWebBrowser.Document.innerHTML
*&
RETURN lcHTML


*&  Method 2, with Microsoft.XMLHTTP Object.
LOCAL loHTTP, lcHTML, lcURL
*&
loHTTP = CreateObject("microsoft.XMLHTTP")
loHTTP.Open("Get", lcURL, .F.)
loHTTP.Send()
lcHTML = loHTTP.responseText
*&
RETURN lcHTML
HTH


>Hi,
>
>This is Antony. How can i get the HTML Code if I just know the URL in VFP7?
>I try to use the Web Browser Control Foundation Class, but, anyway, I can get the HTML code event it have a method GetHTML().
>
>Regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform