title: WebView JavaScript on Android <script> tag
body: <p>I'm having some problems trying to load an HTML code on the webView, </p>
  
  <pre><code>private final String WEB_VIEW_HTML ="&lt;html&gt;&lt;head&gt;&lt;script src=\"http://www.mywebsite.com/reporter.js\"&gt;&lt;/script&gt;&lt;/head&gt;&lt;body onload=\"reporter = new MyWebsite.Reporter(Key);\"&gt;&lt;/body&gt;&lt;/html&gt;";
  </code></pre>
  
  <p>and after doing a <code>aWebView.loadData(WEB_VIEW_HTML_PROD, "text/html", "UTF-8");</code></p>
  
  <p>And after that I need to call the "reporter" object, to do some pings etc.</p>
  
  <p>Something like: </p>
  
  <pre><code>public void reportPageLoad()
  {
      mHandler.post(new Runnable() {
          public void run() {
              aWebView.loadUrl("javascript:reporter.reportPageLoad()");
          }
      });
  }
  </code></pre>
  
  <p>But When I'm trying to call the "reporter" it doesn't exist. Any Ideas?</p>