Numan
(Numan)
October 17, 2022, 10:03pm
#1
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:
Result:
1 Like
yusufcihan
(Yusuf Cihan)
October 24, 2022, 9:33pm
#2
To communicate between WebViewer and application you can use WebViewString.
Groza
(95)
October 25, 2022, 6:20am
#3
do you want to get the merhaba text?
Js
document.getElementById(’“my”).innerText;
Numan
(Numan)
October 25, 2022, 7:32pm
#4
No, I attempted to call any function in a webpage. For example whether that function is able to print “hello world” to screen.
GZacher
(Glaucius Vinicius Barbosa Zacher)
December 2, 2023, 3:23am
#5
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.