H
huyi0912
Hi!
My html have 2 frames.One is control frame which have a control
applet loaded.Another frame's content will be insert a dynamically
generated applet.But the dynamically generated applet can not get
access to the control applet through it's static variable.How is that?
I found if the applet was not dynamically inserted to the dom
tree,then it can access my control applet.I print the classloader of
each applet and found they are loaded by different classloader(though
their root is the same).It should work for dynamically inserted applet
also because all the pages and applet have the same codebase.Any help
will be appreciated!
The dynamically inserted applet code snippet:
<script>
function insertApplet(){
var div = document.getElementById("appletDiv");
div.innerHTML = "<OBJECT ID='"+appletID+"' classid='clsid:
8AD9C840-044E-11D1-B3E9-00805F499D93' width='300' height='300'>"+
"<PARAM name='code'
value='com.jaspect.applet.AppletPanel.class'> "+
"<PARAM NAME='codebase' VALUE='http://localhost:8080/html'>
"+
...
"</OBJECT>";
}
</script>
<body onLoad="insertApplet{}">
....
</body>
My html have 2 frames.One is control frame which have a control
applet loaded.Another frame's content will be insert a dynamically
generated applet.But the dynamically generated applet can not get
access to the control applet through it's static variable.How is that?
I found if the applet was not dynamically inserted to the dom
tree,then it can access my control applet.I print the classloader of
each applet and found they are loaded by different classloader(though
their root is the same).It should work for dynamically inserted applet
also because all the pages and applet have the same codebase.Any help
will be appreciated!
The dynamically inserted applet code snippet:
<script>
function insertApplet(){
var div = document.getElementById("appletDiv");
div.innerHTML = "<OBJECT ID='"+appletID+"' classid='clsid:
8AD9C840-044E-11D1-B3E9-00805F499D93' width='300' height='300'>"+
"<PARAM name='code'
value='com.jaspect.applet.AppletPanel.class'> "+
"<PARAM NAME='codebase' VALUE='http://localhost:8080/html'>
"+
...
"</OBJECT>";
}
</script>
<body onLoad="insertApplet{}">
....
</body>