Hi everyone,
I'm having a spot of trouble trying to access methods in my applet via javascript on my jsp web page.
I'm embedding the applet into the page with the following code....
<jsp

lugin
type="applet"
code="basicLeftApplet.class"
name="BasicLeftApplet"
align="center" width="240" height="241">
<jsp

arams>
<jsp

aram name="MAYSCRIPT"
value="true" />
</jsp

arams>
<jsp:fallback>
<p>Sorry, unable to start the applet.</p>
</jsp:fallback>
</jsp

lugin>
At the browser this then looks like....
OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="240" height="241" align="center" 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="basicLeftApplet.class">
<PARAM name="type" value="application/x-java-applet;">
<PARAM name="MAYSCRIPT" value="true">
<COMMENT>
<EMBED type="application/x-java-applet" width="240" height="241" align="center" pluginspage="http://java.sun.com/products/plugin/" java_code="basicLeftApplet.class" MAYSCRIPT="true"
>
<NOEMBED>
</COMMENT>
<p>Sorry, unable to start the applet.</p>
</NOEMBED></EMBED>
</OBJECT>
Now if you look close enough you'll see that there's no name item in that little lot at all. This is causing me problems as I need a name option to be able to control the applet's methods via JavaScript.
I've tried using document.applets[0].methodName() but that doesn't work, I get an "object doesn't support property or method" error. Embedding the applet manually and using document.appletname.method() seems to work fine.
Can anybody see why the name tag I'm specifying isn't being displayed on the page after processing?
Or even why the document.applets[0].method() gives me the error?
Thanks in advance,
Chris
