This seems soooo easy, and I have searched, but, it didn't seem to help.
I have a web view on my Activity
and it gets initialised later, and loads a web page, with javascript.
The web page is loading and displays the correct page (ie sURL), however, the Javascript on the page does not run. When I load the page in a desktop browser, it works correctly. If I load the page into one of my HTML Viewers on my Android device, it also works as expected.
The JavaScript/web page can be reduced down to:
What do I need to add to get this working?
I have a web view on my Activity
B4X:
Sub Globals
...snip...
Dim htmlResults As WebView
...snip...
B4X:
htmlResults.Initialize("htmlResults")
htmlResults.JavaScriptEnabled = True
htmlResults.LoadURL(sURL)
The JavaScript/web page can be reduced down to:
HTML:
<!DOCTYPE html>
<html>
<body onclick="if (event.target.title != '') { alert(event.target.title);}">
<span title="Test JS Message" style="position:absolute; top: 0px; left: 0px; width:500px; height:500px; background: #FF0000;"/>
</body>
</html>
What do I need to add to get this working?