im trying to get from applet to object so i can resolve z-index issues. The first applet tag works...my conversion to object doesn't. Can anyone point me in the right direction?
From:
<applet name='previewersGraph' codebase="http://www.mydomain.info/sub/" archive="TMApplets.jar" code='info.tm.web.applet.PreviewerStatsGraphApplet' width='446' height='291'>
<param name="background-color" value="#ffffff" />
<param name="border-color" value="#8c8cad" />
To:
<OBJECT id="previewersGraph" name="previewersGraph" classid="clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA"
width="200" height="200" 开发者_JAVA技巧align="baseline"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0">
<PARAM name="code" value="info.tm.web.applet.PreviewerStatsGraphApplet">
<PARAM name="codebase" value="http://www.mydomain.info/sub/">
<PARAM name="type" value="application/x-java-applet;jpi-version=1.4.2">
<PARAM name="archive" value="TMApplets.jar">
<PARAM name="scriptable" value="true">
No Java 2 SDK, Standard Edition v 1.4.2 support for APPLET!!
</OBJECT>
Firefox fails with a classid attribute. The below should work cross browser:-
<p>
<object type="application/x-java-applet"
name="previewersGraph" width="446" height="291">
<param name="codebase" value="http://www.mydomain.info/sub/" />
<param name="code" value="info.tm.web.applet.PreviewerStatsGraphApplet" />
<param name="archive" value="TMApplets.jar" />
<param name="scriptable" value="true" />
<param name="mayscript" value="true" />
<param name="background-color" value="#ffffff" />
<param name="border-color" value="#8c8cad" />
</object>
</p>
In my tests both IE8 and FF5 required the "type" attribute. The mayscript param is only required for Java plugins before 1.6.0.10. The scriptable param is still required according to javadocs 1.6.0.21. In a test with 1.6.0.24 for a signed applet, IE8 called it OK from JS without scriptable being set true.
The HtmlConverter tool in the jdk/bin directory should help you to create the Object tag (at least with an old version of Java). Now Sun (euh Oracle) recommends the applet tag and even jnlp. Look at the deployJava.js script.
I don't think changing it to object will fixed your problem as the applet will be still be paint above the HTML.
Why you do not use deployment toolkit ? It would save you a lot of trying - see http://rostislav-matl.blogspot.com/2011/10/java-applets-building-with-maven.html for more info.
精彩评论