title: Javascript injection into webview
body: <p>I know it exists a lot of questions about that but i don't understand why my following code does not work anymore</p>
  
  <p>Here is my code :</p>
  
  <pre><code>private void init() {
      webview.setWebViewClient(new FormWebViewClient());
      webview.postUrl(url, EncodingUtils.getBytes(data, "BASE64"));
  }
  
  private class FormWebViewClient extends WebViewClient {
          @Override
          public void onPageStarted(WebView view, String url, Bitmap favicon) {
              super.onPageStarted(view, url, favicon);
              // progressBar.setVisibility(View.VISIBLE);
          }
  
          @Override
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
              LOGD(TAG, "Url : " + url);
              view.loadUrl(url);
              return true;
          }
  
          @Override
          public void onPageFinished(WebView view, String url) {
              view.loadUrl("javascript:" +"document.getElementsByClassName('my_class_name')[0].value = '" + myValue + "';" +
      }
  }
  </code></pre>
  
  <p>My original webview is overrided and it displays only <code>myValue</code> in the page instead of plenty of informations.</p>
  
  <p>If anybody knows why i have this behavior ...</p>
  
  <p>Thx</p>
  
  <hr>
  
  <p>EDIT :</p>
  
  <p>and the part of html</p>
  
  <pre><code>&lt;input type="text" size="20" maxlength="19" autocomplete="off" name="CARD_NUMBER" id="CARD_NUMBER" class="my_class_name" value=""&gt;
  </code></pre>