title: Can't submit form in webview?
body: <p>I'm trying again, because the last question didn't get any responses...</p>
  
  <p>I have a form, which I'm filling out and committing in a webview with javascript injection, but I cant figure out how to click/submit the form..</p>
  
  <p>i have tried all of the un-commented functions without any luck.</p>
  
  <pre><code>public void navigateToScheduleWebPage() throws IOException {
  
  
  
              webView.loadUrl("javascript:(function(){ " + "document.getElementsByName('aarskort')[0].value=201506426;" + "})()");
  
              // webView.loadUrl("javascript:(function(){ " + "document.getElementsByTagName('input')[1].submit();" + "})()");
  
              //webView.loadUrl("javascript: {document.getElementsTagName('form')[0].submit();}");
  
              /*  webView.loadUrl("javascript:(function(){"+
                  "doc=document.getElementsByName('B1')[0];"+
                  "event=document.createEvent('HTMLEvents');"+
                  "event.initEvent('click', true, true);"+
                  "doc.dispatchEvent(event);"+
                  "})()");
  
                  */
  
  
          // call getScheduleAsync, all html included
          webView.loadUrl("javascript:HtmlViewer.getScheduleAsync" +
                  "('&lt;html&gt;'+document.getElementsByTagName('html')[0].innerHTML+'&lt;/html&gt;');");
  
  
      }
  </code></pre>
  
  <p>this is the structure of the webpage im trying to work with..</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  
  &lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;Skema&lt;/title&gt;
     &lt;META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
     &lt;script language="JavaScript"&gt;&lt;/script&gt;
     &lt;script&gt;
  
  
     &lt;/script&gt;
  
  &lt;LINK rel="stylesheet" type="text/css" href="/design/au.css"&gt;
  &lt;LINK rel="stylesheet" type="text/css" href="/design/js/aunoprint.css"&gt;
  
  &lt;/head&gt;
  
  
   &lt;body &gt;
  
  
    &lt;FORM action="./ElevSkema.asp" method="post"&gt;
        Opslag for mine tilmeldinger - Indtast studienummer
        &lt;INPUT style="WIDTH: 102px; HEIGHT: 22px" size=15 name=aarskort&gt;
        &lt;INPUT type=submit value=Søg name=B1&gt;
    &lt;/FORM&gt;
  
  
  
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thanks in advance ! :) </p>