Applet calling javascript methods.
| Articles |
In the previous step we looked at how an applet's method may be invoked by a javascript. We have also looked at what sort of HTML tags should be used to enable java - javascript interaction. Now we will finish the show by looking at how a java applet may invoke a javascript function to update a web page.
In order to call javascripts we need to get hold of a JSObject. But first things first, we need to import the netscape.javascript.JSObject into our class. Don't let the name send shivers down your spine, this works with IE.
public void init()
{
jso = JSObject.getWindow(this);
}

