Inserting Applets (plugin 1.3.1)

I've inserted my applet into HTML via HTMLConverter 1.3.

The Applet works fine both in MSIE 5.5 and NN 6.0 (according to console output).

The problem is, that I can't see applet's methods in Netscape. It says, that document.embeds["myapplet"] has no properties, or the method I call doesn't exist.

When I insert the applet with <APPLET>, it works in Netscape, but doesn't in MSIE.

Is this caused by the plug-in 1.3.1? Or is it Netscape's fault?

[496 byte] By [Mracka] at [2007-9-26 3:36:00]
# 1
Have you set mayscript="true" and scriptable="true"?
john060257 at 2007-6-29 12:06:53 > top of Java-index,Desktop,Deploying...
# 2
Yes. In both tags (<OBJECT> and <EMBED>). With both possible ways (in the tags and as <PARAM>).
Mracka at 2007-6-29 12:06:53 > top of Java-index,Desktop,Deploying...
# 3

Do your converted tags (embed and object) contain a name or ID element that would be used by the javascript (document) to identify the applet?

I do not yet know a way around this, but I noticed that the conversion using the plugin does not include the NAME= element of the plugin tag.

If you have this problem and have figured it out, please let me know.

Mark

mkozikowski at 2007-6-29 12:06:54 > top of Java-index,Desktop,Deploying...
# 4

Here is my html

<!--"CONVERTED_APPLET"-->

<!-- CONVERTER VERSION 1.3 -->

<OBJECT

classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

WIDTH="30" HEIGHT="30"

NAME="Test001" ID="Test001"

MAYSCRIPT="true"

SCRIPTABLE="true"

codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0">

<PARAM NAME="CODE" VALUE = xmlparser2.XMLParser.class >

<PARAM NAME="ARCHIVE" VALUE="XMLParser2.jar">

<PARAM NAME="NAME" VALUE="Test001">

<PARAM NAME="ID" VALUE="Test001">

<PARAM NAME="MAYSCRIPT" VALUE="true">

<PARAM NAME="SCRIPTABLE" VALUE="true">

<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.1">

<COMMENT>

<EMBED

type="application/x-java-applet;version=1.3.1"

CODE="xmlparser2.XMLParser.class"

ARCHIVE="XMLParser2.jar"

NAME="Test001" ID="Test001"

WIDTH="30" HEIGHT="30"

MAYSCRIPT="true"

SCRIPTABLE="true"

pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html">

<PARAM NAME="MAYSCRIPT" VALUE="true">

<PARAM NAME="SCRIPTABLE" VALUE="true">

<NOEMBED>

</COMMENT>

</NOEMBED>

</EMBED>

</OBJECT>

<!-- END OF HTML -->

NN6 gives the following values:

document.getElementById("Test001") = "[object HTMLObjectElement]"

document.Test001 = "[object HTMLEmbedElement]"

document.embeds["Test001"] = "[object HTMLEmbedElement]"

but the method call:

> document.embeds["Test001"].parseFile(...);

doesn't recognize as a function:

> document.embeds["Test001"].parseFile is not a function

Mracka at 2007-6-29 12:06:54 > top of Java-index,Desktop,Deploying...
# 5

If you want to try it, download these files, and store them all in one folder.

http://mracka.host.sk/xxx.html

-- this one doesn't work in NN 6

http://mracka.host.sk/XMLParser.html

-- this one works fine in both MSIE 5.5 and NN 6

http://mracka.host.sk/xmlparser2.jar

-- signed jar

http://mracka.host.sk/bookstore.xml

-- sample data

http://mracka.host.sk/mike.cer

-- import this

Mike

Mracka at 2007-6-29 12:06:54 > top of Java-index,Desktop,Deploying...