This page is not maintained anymore,
and has been archived. The information on this page
must be taken with care, because it might not be valid anymore.
With the compliments of
Back to JavaScript Consulting index Click here to see the Java code. Click here to read important points to observe when dealing with LiveConnect. Does this work in the Java plug-in? Click here to know Do you have another question which not handled here? Click here... |
Communication Java <--> JavaScript
(LiveConnect) Different users asked about LiveConnect. Here is a basic example involving communication between Java and JavaScript, with an applet compiled using JDK 1.0.2, running in the standard JVM. Following cases are handled A: Java -> JavaScript 1) Java notifies JavaScript when the applet is started. 2) Java notifies JavaScript when a Java button is clicked. 3) Java accesses a form element directly in the HTML 4) Java accesses a form element in the HTML through a JS function with arguments 5) Java uses alert() in JavaScript B: JavaScript -> Java 6) JavaScript calls a public method in Java with an argument (int) 7) JavaScript calls a public method in Java with an argument (string) |
|
|
|
|