Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Webview.vcx: _webbrowser4 methods showing strange behavi
Message
From
05/07/2001 17:34:48
 
 
To
02/07/2001 06:11:02
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00525789
Message ID:
00527223
Views:
34
The _webbrowser4 class simply encapsulates the ActiveX control of Microosft WebBrowser. Unfortunately, the WebBrowser control does not directly expose the complete HTML source fo the downloaded URL. The getsourceHTML() method exists simply to get the HTML source when the URL is a file:: (not http::). The limitation of this is in the WebBrowser control (part of Internet Explorer) and not a limitation with VFP nor the _webbrowser4 class as you assumed in your messages. The only way to get close to doing this is to use IE DHTML and references the web browser object instance with oWebBrowser.document.body.outerHTML, and there are other ways to access the contents of the HTML tag via DHTML, but you won't get the exact orginal HTML donwloaded source but instead the active loaded DHTML which may vary from the downloaded source. If you are looking to download the exact HTML source from any HTTP based URL, then the _webbrowser4 class is not the write way to do it, it was not designed to do that since it is a limiation of the IE Web Browser control.

Ken

>I'm trying to create an application in VFP6, using the webview.vcx file to get embedded IExplorer web access. I want to be able to
> grab the URL and HTML source of the web page currently displayed in the IE browser viewport. The cURL property always updates
> fine but the getsourceHTML() method only updates the csourceHTML property when I access a local document (i.e.
> file://c:\web\test.htm). When I acces an http:// document accross the web, the getsourceHTML() method updates csourceHTML with
> a blank (or a .NULL.). I can save this HTML file from the web locally on my C: drive, access it locally (via file://), it displays in IE fine
> (just as it did when accessed via http://), but the source HTML is now available using getsourceHTML(). Why this odd behavior and
> more importantly, how can I get source HTML access from the http:// document stored somewhere on the web?
>
>Placed this request for help in the wrong category yesterday: Foxweb, sorry about that. I think I'm in the right place this time.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform