can you please show me how I can exchange data between web part and FW?
Thank you in advance
Otto
- Code: Select all Expand view RUN
#include "FiveWin.ch"
function Main()
local oWnd, oWndChild, oActiveX, oDk
DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MDI
DEFINE WINDOW oWndChild MDICHILD OF oWnd
oActiveX = TActiveX():New( oWndChild, "Shell.Explorer" )
oWndChild:oClient = oActiveX // To fill the entire window surface
oWndChild:Resize()
oActiveX:Do( "Navigate2", "c:\fwh_2021\samples\button1.html" )
? "wait"
oDk := oActiveX:GetProp("Document")
oActiveX:bOnEvent = { | event, aParams, pParams | EventInfo( event, aParams, pParams, oActiveX, oDk ) }
ACTIVATE WINDOW oWnd
return nil
function EventInfo( event, aParams, pParams, oActiveX, oDk )
local buf := ""
local cShow := ""
do while .T.
if valtype(oDk:body)!="U"
if oDk:body:ReadyState="complete"
sysrefresh()
buf := oDk:getElementById("demo"):InnerHTML
if len(alltrim(buf)) > 0
cShow := buf
oDk:getElementById("demo"):InnerHTML := ""
buf := ""
? cShow
endif
exit
endif
endif
sysrefresh()
enddo
return
button1.html
- Code: Select all Expand view RUN
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h2>Login Form</h2>
<div class="container">
<label for="uname"><b>Username</b></label>
<input id="name1" type="text" placeholder="Enter Username" name="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<button onclick="myFunction()">Click me</button>
<label>
<input type="checkbox" checked="checked" name="remember"> Remember me
</label>
</div>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>
</body>
</html>