I am using the following code in the main activity , its giving the function display() is not defined
public class cordovaExample extends DroidGap {
Context mcontext;
private novel n;
private Server s;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new Thread(new Server(this)).start();
try {
Thread.sleep(500);
} catch (InterruptedException e) { }
new Thread(new Client()).start();
super.init();
n = new novel(this, appView);
s = new Server(this,appView);
appView.getSettings().setJavaScriptEnabled(true);
appView.addJavascriptInterface(n, "novel");
appView.addJavascriptInterface(s, "Server");
super.loadUrl("file:///android_asset/www/index.html");
super.loadUrl("javascript:display()");
}
}
At the last line it giving the error display() is not defined
function display() {
alert("abc");
}
Above code shows the display function which is I am using in the html file
Any type of help will be appreciated