Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java script function is not working(Java script function is not working)
Java script function is not working [message #1394498] Sat, 05 July 2014 11:34 Go to next message
Rk Moorthy is currently offline Rk MoorthyFriend
Messages: 1
Registered: July 2014
Junior Member
I am newbie of android development in eclipse.
Here i just created a web view, Created one html page and one java script function.
I can view the html controls in screen but the java script function(onclick) is not working..

My Web View:
protected void onCreate(Bundle savedInstanceState)

//setTitle("Google Chart using HTML & JS");
WebView webView = (WebView) findViewById(;
WebSettings webSettings = webView.getSettings();

_interface = new WebAppInterface(this);
webView.addJavascriptInterface(_interface, "WebAppInterface");

<script type="text/javascript" src="www/index.js"> </script>
<script type="text/javascript" src="www/webappinterface.js"> </script>
<link rel="stylesheet" type="text/css" href="./css/styles.css"/>

What's your name ?
<input id="name" value="" />
<button onclick="sayhello()">Say Hello</button>

function sayhello() { alert('Hi', + document.getElementById('name').value + '!'); }

Can anyone help me regarding this..

Re: Java script function is not working [message #1395527 is a reply to message #1394498] Mon, 07 July 2014 03:03 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2551
Registered: July 2009
Senior Member
This question is highly specific to Android, not Eclipse.

Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Eclipse Disorder
Next Topic:ScoreNinja
Goto Forum:

Current Time: Tue Oct 06 01:50:20 GMT 2015

Powered by FUDForum. Page generated in 0.01966 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software