Skip to main content

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: 4039
Registered: July 2009
Senior Member

This question is highly specific to Android, not Eclipse.

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Eclipse Disorder
Next Topic:ScoreNinja
Goto Forum:

Current Time: Fri Apr 23 14:50:34 GMT 2021

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

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

Back to the top