Calling JS Functions With Webviewer

Hello
I attempted to call js function in my html file with web viewer. I failed. Is it impossible. Or where am I doing wrong?
My html file is:

<!DOCTYPE html>
<html>
<body>
<p id="my">Merhaba<p>


<script>
function myFunction() {
document.getElementById('my').innerText="Hello World";

}
</script>
</body>
</html> 

Block for JS:
resim

Result:

1 Like

To communicate between WebViewer and application you can use WebViewString.

do you want to get the merhaba text?

Js
document.getElementById(’“my”).innerText;

No, I attempted to call any function in a webpage. For example whether that function is able to print “hello world” to screen.

If you click in web_viewer1, there’s a block with the suffix “.After JS Evaluated” who returns a variable “result”, that variable returns the content of any evaluated javascript, maybe this could give you some info about what’s happening.