>>>Hi all,
>>>
>>>I have an instance of the Web Browser control on a VFP 7 form. I've successfully navigated to the desired URL.
>>>
>>>How do I now gain access, programmatically, to the HTML code for that URL? I need to parse the HTML for a particular tag, and would like to use the new STREXTRACT function of VFP 7 to search for the value associated with the tag.
>>>
>>>TIA,
>>
>>
Thisform.WebControl1.document.documentElement.innerHTML
>>HTH
>
>Hi J,
>
>That gives me a "Member DOCUMENT does not evaluate to an object" error.
>
>Do I possibly need to wait for the page to finish loading before I fire this code? Is there some type of a property of the Browser control which I can monitor that tells me when the page is finished?
>
>Appreciate all your (quick) help...
Yes, the page needs to be loaded already for this to work. To wait for the page to be loaded, use this snippet:
Do While Thisform.WebControl1.Document.ReadyState <> "complete"
Enddo
Could be in the init of the form or web control container.