0
http://stackoverflow.com/questions/3479833/is-it-possible-to-get-the-html-code-from-webview

got many links to get the html code from webview, but need to manipulate it and then again load it back. Is it possible to do that.if yes, please give some ideas. I have not that much idea of java script.

zaiff
  • 999
  • 2
  • 13
  • 29

2 Answers2

1

you can load from an HTML string:

String summary = "<html><body>You scored <b>192</b> points.</body></html>";
webview.loadData(summary, "text/html", null);
Martin
  • 4,711
  • 4
  • 29
  • 37
0

Got it:

 webview.loadUrl("javascript:document.getElementById(\"N\").value = 'dfdfdfd';"+
                     "document.getElementById(\"Pass\").value = 'fdfdfde'");

where "N" and "Pass" are control names in the html

I have done it in onPageFinished().

zaiff
  • 999
  • 2
  • 13
  • 29