Note that there are some explanatory texts on larger screens.

plurals
  1. POIn IE9 and IE9 Platform Preview, I am no longer able to call a Javascript method from my Java Applet
    text
    copied!<p>In prior versions of IE and in Firefox, I am able to call methodFoo in JavaScript from my Java Applet running on the same page. In IE9, this no longer works. Is there some additional step, or a different way of doing this that will work for IE9?</p> <p>My Java Applet contains</p> <pre><code>import netscape.javascript.JSObject; ... private transient JSObject jso; ... public void init() { ... jso = JSObject.getWindow(this); ... } public void CalledFromSecondaryThread(){ ... jso.call("methodFoo", object_to_pass); ... } </code></pre> <p>My Html page contains</p> <pre><code>... &lt;object style="height: 1px;width: 650px;" classid = "clsid:CAFEEFAC-0016-0000-0011-ABCDEFFEDCBA" codebase = "http://java.sun.com/update/1.6.0/jinstall-6u11-windows-i586.cab#Version=6,0,0,11" id="AppletControl"&gt; &lt;param name="java_arguments" value="-Xmx256m" /&gt; &lt;param name = "CODE" value = "com.namespace.Applet.class" /&gt; &lt;param name = "archive" value = "./lib/applet.jar" /&gt; &lt;param name = "type" value = "application/x-java-applet;version=1.6" /&gt; &lt;param name = "scriptable" value="true" /&gt; &lt;param name = "mayscript" value="true" /&gt; &lt;/object&gt; ... &lt;script type="text/JavaScript" src="js/script.js"&gt;&lt;/script&gt; ... </code></pre> <p>and script.js contains</p> <pre><code>function methodFoo(object_to_pass){ //doStuff } </code></pre> <p>The Exception received from jso.call is </p> <pre><code>netscape.javascript.JSException: No such method "methodFoo" on JavaScript object </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload