hi,
I'm trying to communicate Java to JavaScript through the class netscape.javascript.JSObject. I'm using the method setMember to create a new object called API that is the applet itself and it works fine in Netscape 7.0 but it doesn't work in IE 6.0 for WinXP.
My applet code is something like this:
the HTML page looks like this:
if I check the java console I see this error:
netscape.javascript.JSException: unknown source
I think the setMember method doesn't accept to create a new object on DOM model.
any ideas?
thanks in advance
I'm trying to communicate Java to JavaScript through the class netscape.javascript.JSObject. I'm using the method setMember to create a new object called API that is the applet itself and it works fine in Netscape 7.0 but it doesn't work in IE 6.0 for WinXP.
My applet code is something like this:
Code:
import netscape.javascript.*;
import java.applet.*;import java.awt.*;
class test extends Applet {
public void init() {
JSObject win = JSObject.getWindow(this);
win.setMember("newDOMobject",this); //here...i'm trying to create a new member of DOM model
}
}
the HTML page looks like this:
Code:
<html><head><title>TEST</title></head><body><APPLET CODE="test.class" WIDTH=300 HEIGHT=300 MAYSCRIPT></APPLET></body></html>
if I check the java console I see this error:
netscape.javascript.JSException: unknown source
I think the setMember method doesn't accept to create a new object on DOM model.
any ideas?
thanks in advance