Hi Everyone,

I had the following code that worked in IE 5.x and NS 4.x but NS 6.  Does anyone have 
a workaround for NS LiveConnect?

import java.awt.*;
import javax.swing.*;
import netscape.javascript.JSObject;

public class Applet1 extends JApplet
{
     JSObject obj;
    public void init(){
       try {
           obj = JSObject.getWindow(this);
       } catch (Exception e) {}
                
       foo f = new foo();
       f.value = true;
       Object o[] = {f};
       obj.call("testing", o);
   }
        
    class foo {
       public boolean value;
       public foo() {
           value = false;
      }
   }
}

<HTML>
<HEAD>
        <SCRIPT language="javascript">
        function testing(obj)
        {
           if (obj.value) {  // Failed right here.  I got an IllegalAccessException
               alert("true");
          } else {
              alert("false");
        }
        </SCRIPT>
</HEAD>
<BODY>
        <applet
                code=Applet1.class
                name=Applet1
                width=320
                height=200 mayscript>
        </applet>

</BODY>
</HTML>

This is the exception that I got:
ava.security.PrivilegedActionException: java.lang.IllegalAccessException
at java.lang.reflect.Field.get(Native Method)
at sun.plugin.liveconnect.PrivilegedGetFieldAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.GetField(Unknown Source)
Thank you in advance.
[EMAIL PROTECTED]
-Quoc
 



-- 
Sent  by  qnguyen from kofax  part from  com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new

Reply via email to