Skip to content Skip to sidebar Skip to footer

Javascript Not Working With Android Webview, Uncaught Referenceerror

I am trying to load a web app on android using WebView and the JavaScript in my html files is not executing properly. I create the WebView and load the home page like this: web = n

Solution 1:

Basically webview is not able to find the function doRegister() , sine that is in a different html page register.html, which is not loaded. Try this 1. Move the js portion in register.html to some .js file say func.js 2. Then refer to func.js from your home.html as

<scripttype="text/javascript"src="func.js"></script>

3. once page is loaded, clicking on the button should call doRegister()

Post a Comment for "Javascript Not Working With Android Webview, Uncaught Referenceerror"