That would not work right. Instead, the code should look something like this:
Code:
<applet name="myapplet" ...>
<script language="JavaScript">
<!--
var value = document.applets['myapplet'].methodName();
//-->
</script>
That calls the method called methodName in the applet and stores the value in the JavaScript variable value. Note that while I've called Java methods from JavaScript before, I've never tried storing the return value in a variable so I can't guarantee this works as advertised. Do let me know!
Bookmarks