i have got a Problem with Javascript and it´s Communication to an applet. In every Browser Javascript does find the applet and i can call it´s methods, but in IE9 it does not find the object/applet. heres the code
<div class="speichern" align="center">
<object type="application/x-java-applet" width="10" height="10" id="jsap" name="jsap">
<param name="archive" value="ABD_Downloadmanager.jar,ojdbc6.jar"> </param>
<param name="code" value="Speichern_Applet.class"> </param>
<param name="mayscript" value="yes">
<param name="scriptable" value="true">
</object>
</div>
and the Javascript call :
var appletObj = document.getElementsByName('jsap')[0];
var path = appletObj.test();
the test Method does just return a String return "C:/";
when i use the an alert(appletObj );
Firefox does show me object HtmlObjectElement
But the IE does only show object
i have tried this ways to get the applet without any success:
var appletObj = document.getElementsByID('jsap')[0];
var appletObj = document.getElementsByID('jsap');
var appletObj = document.jsap;
var appletObj = document.applets[0];
for me it looks like the IE simply cannot work with the object tag or something like this? someone got a solution for this or an idea why the IE can not find the object/applet?
Thanks for reading so far
I Just found out the Problem which came up in here. I was using the style='visible:hidden' attribute. But a hidden DOM object, in this case the Object tag/ applet won´t be loaded by the IE. I just had to set the size to (0,0). Genius...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.