FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Replace html in TWEBVIEW2
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Replace html in TWEBVIEW2
Posted: Wed Jul 09, 2025 06:08 PM

Hi Guys,

How could I load another HTML in a TWEBVIEW2 previously created?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Replace html in TWEBVIEW2
Posted: Thu Jul 10, 2025 08:28 AM

Dear Vilian,

Please try this:

oWebView:SetHtml( NewHtml() )

where function NewHtml() returns the new cHTML as a string, that you want to use

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Replace html in TWEBVIEW2
Posted: Thu Jul 10, 2025 11:14 AM

Antonio,

Thanks. I tried it, but it didn't work.

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Replace html in TWEBVIEW2
Posted: Thu Jul 10, 2025 06:23 PM

Please provide the PRG you are testing, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Replace html in TWEBVIEW2
Posted: Thu Jul 10, 2025 06:42 PM

Antonio,

It was my mistake. Worked perfectly! Thank You !

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Replace html in TWEBVIEW2
Posted: Fri Jul 11, 2025 07:32 PM
Antonio Linares wrote: Dear Vilian,

Please try this:

oWebView:SetHtml( NewHtml() )

where function NewHtml() returns the new cHTML as a string, that you want to use
IF I have a button or an image that are being shown in the webview/html, is possible call a FWH function from a click on them?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 231
Joined: Fri Jul 20, 2012 01:49 AM
Re: Replace html in TWEBVIEW2
Posted: Sat Jul 12, 2025 12:19 AM
I think that it is the way:
oWebView:bOnBind = { | cJson | HandleCallback( cJson ) }

function handleCallBack( cJSON )
 
msgInfo( cJSON, "message" )

return
and from the HTML/JS you call the function SendToFWH to send it to the FiveWin.

Good Lucky
Regards,

Lailton Fernando Mariano

Continue the discussion