Antwise community forums
HTML to FOXPRO9 - Printable Version

+- Antwise community forums (https://forums.antwise.com)
+-- Forum: Antview (https://forums.antwise.com/forumdisplay.php?fid=11)
+--- Forum: Antview for Windows (https://forums.antwise.com/forumdisplay.php?fid=12)
+--- Thread: HTML to FOXPRO9 (/showthread.php?tid=203)



HTML to FOXPRO9 - joao - 2024-11-06

Hey guys, is it possible to press a button in the html and open a form in foxpro9?

Ok I figured it out, I dont know if this is the best way but it works.

Javascript:

<button onclick="sendMessage()" id="btn">Open</button>
<script>
function sendMessage() {
if (window.chrome && window.chrome.webview) {
window.chrome.webview.postMessage('test');
} else {
console.log('WebView is not available');
}
}
</script>

then in in procedure OnWebMessageReceived you receive 'test' in LPARAMETERS messageasstring


RE: HTML to FOXPRO9 - wila - 2024-11-06

Hi Joao,

Yes, that's the best way indeed.

The next release of AntView 2.0 has some code example in the VFP examples that does exactly that.
If interested I can send you a link to a private build.

--
Wil


RE: HTML to FOXPRO9 - joao - 2024-11-06

(Yesterday, 15:52:43)wila Wrote: Hi Joao,

Yes, that's the best way indeed.

The next release of AntView 2.0 has some code example in the VFP examples that does exactly that.
If interested I can send you a link to a private build.

--
Wil

Hi wil, theres no need im just testing. And then if everything is, as I needed, I will buy your software.

Thx great work, life saving Smile