Hello!
I want to execute a javascript function located on a web page hosted by a external server. By example, I have this code :
Sub panelDateSelected_Click
Dim JavascriptInterface1 As DefaultJavascriptInterface
dim patientFolder as WebView
dim WebViewExtras1 as WebViewExtras
patientFolder.Initialize("patientFloder")
patientFolder.url = "joctest.zapto.org" //is just for test.
WebViewExtras1.Initialize(patientFolder)
JavascriptInterface1.Initialize
WebViewExtras1.AddJavascriptInterface(JavascriptInterface1, "B4A")
Javascript="B4A.CallSub('Process_HTML', true, hello())" //The function call hello and display hello world
End sub
That not work, the page load but the function it not call.
I don'y know if I have the good code or if I use the good setup...
the code of the html page, that call when call url it :
<html>
<script>
function hello(){
alert("hello world");
}
</script>
<body style="text-align:center">
<div style="text-align:center;margin:20px;backgroud-color:#B1COD5">
<img src="monCadre2.jpg" alt="Kathleen" style="display:inline">
</div>
</body>
</html>
Thank you for your help.
I want to execute a javascript function located on a web page hosted by a external server. By example, I have this code :
Sub panelDateSelected_Click
Dim JavascriptInterface1 As DefaultJavascriptInterface
dim patientFolder as WebView
dim WebViewExtras1 as WebViewExtras
patientFolder.Initialize("patientFloder")
patientFolder.url = "joctest.zapto.org" //is just for test.
WebViewExtras1.Initialize(patientFolder)
JavascriptInterface1.Initialize
WebViewExtras1.AddJavascriptInterface(JavascriptInterface1, "B4A")
Javascript="B4A.CallSub('Process_HTML', true, hello())" //The function call hello and display hello world
End sub
That not work, the page load but the function it not call.
I don'y know if I have the good code or if I use the good setup...
the code of the html page, that call when call url it :
<html>
<script>
function hello(){
alert("hello world");
}
</script>
<body style="text-align:center">
<div style="text-align:center;margin:20px;backgroud-color:#B1COD5">
<img src="monCadre2.jpg" alt="Kathleen" style="display:inline">
</div>
</body>
</html>
Thank you for your help.