title: fill form programmatically in Android Webview - JavaScript
body: <p>I'm trying to automatically fill a form from the website of my school. 
  I've seen some ways to do with javascrip. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.navegador_siiau_layout);
  
      navegador_siiau = (WebView) findViewById(R.id.wv_navegador_siiau);
      navegador_siiau.getSettings().setJavaScriptEnabled(true);
      navegador_siiau.loadUrl("http://siiauescolar.siiau.udg.mx/wus/gupprincipal.inicio");
      navegador_siiau.setWebViewClient(new WebViewClient() {
          public void onPageFinished(WebView view, String url) {
              String user="207512134";
              String pwd="FENMAA";
              view.loadUrl("javascript:document.getElementsByName('p_codigo_c').value = '"+user+"';document.getElementsByName('p_clave_c').value='"+pwd+"';");
          }
      });
  
  
  
  }
  </code></pre>
  
  <p>The result is a blank page with the last string I try to put in the form... 
  What can I do to fill and submit the form correctly?</p>