title: Adding javascript code after a remote html page loaded in Android Webview
body: <p>I have a problem with webview in Android.
  I'm working with an application that has 2 fragments; first has an EditText and second a webview.</p>
  
  <p>Is it possible to pass the string of the Edittext in the page loaded in the webview by calling a javascript function that modify the DOM of the page loaded?</p>
  
  <p>For example, after loading in the webview:</p>
  
  <pre><code>webview.loadUrl("http://google.it");
  </code></pre>
  
  <p>I want insert in the edittext of the google search page a string passed from java; I tried this as first step:</p>
  
  <pre><code>webview.setWebViewClient(new WebViewClient() {  
              @Override  
              public void onPageFinished(WebView view, String url)  
              {  
                 webview.loadUrl("javascript:(function() {alert();})()");  
              }  
          });  
  </code></pre>
  
  <p>But the alert is not displayed. </p>
  
  <p>Thanks for any feedback, and sorry for my not perfect English. </p>