jeudi 13 septembre 2018

Android WebView: javascript doesn't recognise clicks

I have a simple web application, which I'm trying to display through an Android WebView. The webpage consist of not much more than just one HTML table. Each of the cells of said table have an onclick property set to a javascript function, which brings up a box with some information.

This works well in all browsers, both desktop and mobile. However, when I try to click any of the table cells through my Android WebView, nothing happens, the webpage doesn't seem to recognise the clicks.

(Note: I did enable JavaScript for the webview, it does exactly what it should, for example when the document is loaded, only it doesn't recognise the clicks and doesn't fire the corresponding events.)

I've tried searching for an answer, but I had no luck. All of the threads I've read were referring to slightly different problems, mostly executing Android code by calling a JS function, and vice versa. That's not what I need. What I need to know is this: Is there an easy way (or setting) to pass the clicks from my webview to the page, or do I have to do the complicated java/javascript integration that I've read about in other posts? Thank you very much in advance, and please don't get too upset if my terminology isn't spot on, I'm just a self-taught enthusiast.




Aucun commentaire:

Enregistrer un commentaire