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