Hello Juri,
nice to hear from you, too.
It works, if I turn off protected mode in the IE security options, true.
Still, if I don't do so navigate2() is not just working in a new tab of the oIE reference, it works in another IE instance! And as I have no access to that instance, I still consider that a bug, likely a bug of IE7.
Now I also wonder, why does the code works, when I runasadmin VFP9.exe (right click on it's link in start menu and run as Administrator). IE then running with protected mode and tabbed browsing, it still works. Using IE as an administrator should not change the behaviour of protected mode, should it?
There are two other workaraounds for this. Markus Winhard used the Webbrowser control in his GetInnerHTML function:
cHTML = GetInnerHtml( "http://www.live.com/" )
Messagebox(cHTML)
Function GetInnerHtml
Lparameters tcUrl
Local lcInnerHtml
With Createobject( "Form" )
.AddObject( "IE", "OLEControl", "Shell.Explorer" )
.IE.Visible = .T.
.IE.Navigate( m.tcUrl )
Do While Not .IE.ReadyState == 4
DoEvents Force
Enddo
lcInnerHtml = .IE.Object.Document.Body.innerHtml
Endwith
Return m.lcInnerHtml
Endfunc
Joki used the Ajax way:
Local oXml, lcResponse
oXml = Createobject("Msxml2.XmlHttp")
oXml.Open("get","http://www.live.com/")
oXml.Send()
lcResponse = oXml.responseText
Bye, Olaf.