Basic HTML version of Foils prepared 23 June 1997

Foil 77 LiveConnect Java to JavaScript - II

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo


Suppose applet HelloWorld has method:
  • public void setString(String aString) {
  • javaslocalcopy = aString;
  • repaint();
  • }
You can change javaslocalcopy from JavaScript using:
document.applet["HelloWorld"].setString(myStr);
To avoid a type mismatch, it is best to convert everything explicitly to strings in Java and JavaScript
  • Netscape needs to clarify this!
Correspondingly, Java applets can control web pages containing JavaScript functions and thus access capabilities of Netscape Browser explicitly
  • see NPAC TANGO system



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998