Hi,
I have a .jsp file in the following format:
.... html headers, jsp code, html code...
<jsp:plugin
type="applet"
code="path.in.p acket.appletcla ssname.class"
codebase=".."
jreversion="1.5 "
archive="packet name.jar"
height="0"
width="0"
name="appletnam e"
<jsp:fallback >
<p>Unable to start the applet.</p>
</jsp:fallback>
</jsp:plugin>
.... html code...
<script type="text/javascript">
var theApplet = document.applet s.appletname;
methodOutput = theApplet.callm ethod();
document.write( methodOutput);
</script>
.... the rest of the html code ...
Javascript can call this method with IE 6.0, but with Firefox I get the
following message: "Error: theApplet has no properties".
And here is how Firefox and IE6.0 translate my <jsp:plugin> tag:
<OBJECT classid="clsid: 8AD9C840-044E-11D1-B3E9-00805F499D93"
name="appletnam e"
width="0" height="0"
codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version =1,2,2,0">;
<PARAM name="java_code " value="path.in. packet.appletcl assname.class">
<PARAM name="java_code base" value="..">
<PARAM name="java_arch ive" value="packetna me.jar">
<PARAM name="type" value="applicat ion/x-java-applet;version= 1.5">
<COMMENT>
<EMBED type="applicati on/x-java-applet;version= 1.5" name="appletnam e"
width="0"
height="0" pluginspage="ht tp://java.sun.com/products/plugin/";
java_code="path .in.packet.appl etclassname.cla ss"
java_codebase=" .."
java_archive="p acketname.jar"
clientLocale="e n_IE">
<NOEMBED>
</COMMENT>
<p>Unable to start the applet.</p>
</NOEMBED></EMBED>
</OBJECT>
I have already tried other solutions, like
document.getEle mentsByName() and
document.embeds ( as well as document.getEle mentsByID, but this could
never work with Firefox as, from what I found in google, Firefox does
not assume that applet name = applet id, what IE does).
Still, I never managed to call this method with Firefox.
Would anyone have any other ideas?
Thank you,
Blondie