Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capturing HTML from the MS Web Control
Message
From
17/07/2000 18:21:34
 
 
To
17/07/2000 18:16:01
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00393476
Message ID:
00393581
Views:
12
>>>I need to capture from the MS Web Control (ActiveX). Anyone know how I can do this?
>>
>>Document.Body.InnerHTML will get you everything inside the Body tags. Not sure how to get the header stuff.
>
>I tried this from a button on the form:
>
>strtofile(this.parent.oleweb.document.body.innerhtml, "Html.txt")
>
>and got an error that document was not a valid object.

If you are calling this directly after your navigate call, be sure you are giving IE time to load the page. The Navigate method is asyncrhonous, and the document object doesn't exist until the page begins to load. Even after that the body object won't exist until the page is finished loading. Unless you want to bind to an IE event, this usually means polling first oIE.readyState, and then Document.ReadyState. If you have the June FPA, check the cover article for a nice little wrapper for this...
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform