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
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