Basic HTML version of Foils prepared 2 October 98

Foil 8 Java to JavaScript communication

From Netscape's LiveConnect Technology CPS640 Internet and Multimedia Technologies -- April 98. by Marek Podgorny,Nancy McCracken


JavaScript defines hierarchy of objects on HTML page.
These objects are accessible from Java via LiveConnect mechanisms implemented in netscape.javascript. JSObject class.
  • Example: JSObject.getWindow(this) method returns the root of the JavaScript hierarchy; JSObject.getWindow(this).getMember("document").getMember(frame_name) returns JSObject representing Netscape frame with parameter name=frame_name
JavaScript is aware of Java objects and can call their methods directly.
  • Example: <script>package.class.method();</script>



© 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 Sun Nov 29 1998