2026-03-16, 16:37:47
(2026-03-16, 12:06:23)wila Wrote: Hi CYZ,
Just ran your code like below by putting it into the VFP Standard example under the "Render Page" button and it works as expected.
Code:LOCAL lcHtml
lcHtml = ''
TEXT TO lcHtml NOSHOW PRETEXT 7
<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>Hola Mundo</body></html>
ENDTEXT
LOCAL Success
LOCAL Status
Success = .F.
isStatus = 0
thisform.oantView.object.NavigateToStringSync(lcHtml,@Success,@isStatus)
thisform.text1.value = "Rendered-html"
So it looks like that we are missing out on some context.
Can you show more code than "just the line".
From where are you calling the NavigateToStringSync method?
PS: I noticed that you tried to post, most likely VFP code (or perhaps that html above), which was rejected by the forum's web application firewall. This hopefully works now as the WAF has been tweaked a bit. Sadly we can't run the forum without a WAF anymore.
Hi.
I've worked a lot with Antview. But now, don't know whats happening.
Init of form:
Code:
thisform.oantview.synchronousTimeOut = 20000 && 20 segundos
thisform.oantviewdocument = CREATEOBJECT('AntViewAx2.AntViewDocument') && create the AntViewDocument and assign it to a form property
thisform.oantviewdocument.SynchronousTimeOut = 6000 && 6 segundos. Por defecto es solo 1 segundo
thisform.oantview.Init()
thisform.oantview.UnlockControl("MyCompany", "Mykey")
thisform.oantview.EventsUseHexadecimal = .t.
thisform.oantview.ZoomControlEnabled = .t.
thisform.oantview.zoomFactor = cast(25 as double)
thisform.oantviewdocument.CurrentBrowser = thisform.oantview.object && this property shows as "Write-only" in the object browser
Thisform.oantview.WebMessageEnabled = .T.
Thisform.oantview.defaultScriptDialogsEnabled = .T.
Thisform.oantview.statusBarEnabled = .T.Code:
dodefault()
IF !THISFORM.inicializado
*!* thisform.inicializa()
THISFORM.cargar_editor()
THISFORM.inicializado = .T.
ENDIFCode:
LOCAL m.exito, m.TxWebErrorStatus, m.lcHtml
m.exito = .f.
m.TxWebErrorStatus = 0
TEXT TO lcHtml NOSHOW PRETEXT 7
<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>Hola Mundo</body></html>
ENDTEXT
thisform.oantview.visible = .t.
thisform.oantView.object.NavigateToStringSync(lcHtml,@m.exito,@m.TxWebErrorStatus)
IF !m.exito
messagebox("No se ha podido navegar." + m.crlf + "Error nº: " + alltrim(str(m.TxWebErrorStatus)), 0 + 48)
endifCYZ

