This content has been marked as final. Show 5 replies
Just adding a note:
If I use a button:
If I use a button like this, the applet method gets called from both Netscape and IE. The problem is only when I try to call the java Applet from a script method that was itself called by the java Applet.
My friendly advice is: don't waste time trying to call script functions from Applets: it's too complex to make the system work in a cross-browser fashion, and usually there's a better way to do the same things.
Hi. Thanks for your reply!
But this does not work on IE.
Annother aproach I have tried is to use the the JSObject class:
Exception occurred during event dispatching:
at java.lang.reflect.Constructor.newInstance(Native Method)
at sun.plugin.liveconnect.PrivilegedConstructObjectAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.ConstructObject(Unknown Source)
":-) Ragnvald Barth Software enigneer
Goto mozilla.org in the 0.9.4 release notes under Java they talk about Liveconnect not being fully implemented. They state that it will not be fixed until JDK 1.4 is released.
I am having the same problems in Netscape 6 and mozilla but works fine in netscape 4.7 and IE 5.X and 6
The mozilla browser will actually lock when I call
JSObject jsWin = JSObject.getWindow(this);
in the applet's public init() method
I use this approach and it works fine. The applet would be probably smaller, that is Also a good thing.