Reputation: 17264
I want to change height of a field in webView(Android). I tried doing it using a javascript but it doesn't work.
webView.loadUrl("javascript:(var field = document.getElementById("targetdiv");field.style.height='50px;);");
I've also enabled javascript:
WebSettings ws = webView.getSettings();
ws.setJavaScriptEnabled(true);
Still it doesn't work. Please help me out !
Upvotes: 0
Views: 212
Reputation: 50832
This works along like this
myWebView.loadUrl("javascript:showString('Hello World!')");
where showStringis a function that outputs the given string (not shwon here).
Upvotes: 1