#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWebView
oWebView := TWebView():New()
oWebView:bOnBind = { | cJson, nCalls | MsgInfo( cJson, nCalls ) }
oWebView:Bind( "SendToFWH" )
oWebView:Navigate( Html() )
Sleep( 200 )
oWebView:Eval( "SendToFWH( 'ok' )" )
oWebView:Run()
oWebView:Destroy()
return nil
//----------------------------------------------------------------------------//
function Html()
local cHtml
TEXT INTO cHtml
data:text/html,
<html>
<head>
<meta charset="UTF-8" />
</head>
<body style="background-color:cyan">
<h2>Using WebView from FWH</h2>
<button onclick='SendToFWH( 123 )'>Call FWH app from web browser</button>
<button onclick='SendToFWH( 456 )'>Test 2 Пример</button>
<button onclick='SendToFWH( 123, 456, "yes it works!" )'>Test 3</button>
</body>
</html>
ENDTEXT
? cHtml
return cHtml
//----------------------------------------------------------------------------//
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 73 guests