>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.
Bob,
I've done something like this before. Don't know if the solution would work for you, but here is the basic idea:
oWeb=CREATE("InternetExplorer.Application")
oWeb.Navigate("http://www.yoursite.com")
nMaxSec=10
nSec=Seconds()
Do While oWeb.ReadyState#4
If Seconds()-nSec>nMaxSec
Exit
Endif
Enddo
If oWeb.ReadyState=4
STRTOFILE(oWeb.Document.Body.OuterHTML,"c:\yourfile.htm")
Endif
Regards,
Scott
Scott King
The Support Source Corporation