title: Javascript Not working in WebView - Android?
body: <p><strong>Intro</strong></p>
  
  <p>Below I've got my seriously customized webview (in the OnCreate of my activity)..</p>
  
  <pre><code>   WebView  waw = (WebView) findViewById(R.id.webView1);
  
              waw.getSettings().setBuiltInZoomControls(true);
              waw.getSettings().setSupportZoom(true);
              waw.getSettings().setSupportMultipleWindows(true);
              waw.getSettings().setLoadWithOverviewMode(false);
              waw.getSettings().setJavaScriptEnabled(true);
              waw.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
              waw.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);
              waw.getSettings().setUseWideViewPort(false);
  
              waw.setWebViewClient(new WebViewClient() {
                  public void onReceivedError(...)
  //Show error toast here.
                  }
              });
  
              waw.loadUrl("http://mysecreturl.com");
  </code></pre>
  
  <p>So, after much effort here's everything I've done:</p>
  
  <p>My activity opens in full screen, entirely made up of webview... I start straight away by opening a URL, I've enabled the build in Zoom controls for the pinch zoom, set a default zoom etc.</p>
  
  <p>Problematic Stuff</p>
  
  <p>So, in the website that I'm trying to open, I snooped around the page source, and I found this is exact button that's causing my problem.</p>
  
  <pre><code>&lt;button&gt;&lt;img src="img/Start.png" onclick="javascript:startSurf()"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>It has an image, Start.png, and a function I could not find the exact code of.</p>
  
  <p>This is what I want to open. But can't. I press, and nothing happens, It just ignores the click on this particular button (other links work just fine).... It's got something to do with JavaScript (99% sure)</p>
  
  <p>The links and everything else works just fine, I think this is the only one button that uses JavaScript so maybe that's causing a problem.</p>
  
  <p>When I try doing this, say in Google Chrome on my PC or even the default android browser( on mobile) ... When I press this button (at the same URL) ... a pop-up window appears with a webpage. That's what I want.</p>
  
  <p>Right now I just want it to just open, just do something when I press the button. It can open wherever it wants, a new window, the same page, use the default browser -anything.</p>
  
  <p>I've tried everything I can. (see above) .. I've enabled java script, enabled multiple windows, enabled JS to open a window - Absolutely no change.</p>
  
  <p>(Well, small change - Without enabling these, the OnPress animation of the button didn't work, Now we can see the button is pressed but it still doesn't do anything. Again, I'm talking about the button with the JS function on the website I'm trying to use)</p>
  
  <p>So, How to solve this?</p>
  
  <p>Thank you :-D</p>