I trying to develop a app, with a webview.
All goes well, except if i try to hide an element (DIV) in the HTML code.
When testing by QR code it hides and show the DIV. But when build the apk, it does not work don´t hide, always show everything.
document.getElementById(“MenuUm”).style.display = “none”;
document.getElementById(“MenuDois”).style.display = “block”;
Don’t know why it wouldn’t work. You have to realize that a webviewer is not a full browser. So there may be situations that some things just won’t work. If that is the cause with you i don’t know. You should give some more info on you htmlcode. Show it here or make a aia-file that contains the code.
Hi. There is a sample of the code:
This code, when “body loads” execute the function that should hide some DIVS. It works when testing (by QR code), but when build apk and run it on the same phone, does not work.
Also tryed to put the script block in the header, is the same.
I think the KEY problem her is tha in TEST works all fine, and in build APK an run on phone, not.
Problem solved, after soma hours searching the WEB.
You need to substitute the path from test mode to production mode:
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.