I am trying to call a Java applet from Javascript, but when I pass the object, the Java applet only gets null. This works in IE and Firefox, but not in Safari 4 (the tested version of the OS and Windows does not seem to work).
The Java applet method that I call may look like this:
public void sampleFunction(JSObject someobject) throws Exception
{
someobject.call("somemethod");
}
And the HTML / Javascript that calls it:
<applet archive="Test.jar" code="Test.class" width="0" height="0" id="TestApplet" MAYSCRIPT></applet>
...
var testobject = { somemethod: function() {} };
document.TestApplet.sampleFunction(testobject);
NullPointerException is the result in Safari because the "someobject" parameter in the Java applet is NULL. Again, this works fine on Firefox and IE on Windows, OSX and Linux, but a null parameter will be passed in Safari sampleFunction ().
, . Javascript Java, , , . , , Javascript [Ljava.lang.String type, ( undefined ).
Safari ? ?