Christian Ruediger: Applet mit Javascript steuern

Beitrag lesen

Ich möcht mit Javascript eine Methode in einem Applet aufrufen.
Der Code liegt bei. Im Internet Explorer 5.0 bekomme ich einen "Unspecified Error" in line 11 [ document TestApplet.repaint() ]. Im Netscape Navigator 4.73 bekomme ich die Meldung  "has no properties" auch in line 11. Ich bin mir sicher das das Applet die Funktion repait() enthält (geerbt von java.applet.Applet)(ich nutze das JDK 1.2.2 mit Runtimeenvironment 1.2).
Hier meine HTML Seite:
<html>
<head>

<title>info Part des xmlApplet Tests</title>
<script language="javascript">
function eingeben()
{
var key = document.Formular.key.value;
var value = document.Formular.wert.value;
document.TestApplet.repaint();
}

function ausgeben()
{
var key = document.Formular.key.value;
document.TestApplet.displayValue(key);
}
</script>

</head>
<body>
<p> Here is the applet. </p>

<OBJECT name="TestApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="500" height="300" codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">

<PARAM NAME="code" VALUE="TestApplet.class">

<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2.2">
<PARAM NAME="scriptable" VALUE="true">
<PARAM NAME="MAYSCRIPT">

<COMMENT>

<EMBED name="TestApplet" type="application/x-java-applet" width="500" height="300" code="TestApplet.class" pluginspage="http://java.sun.com/products/plugin/1.2.2/plugin-install.html" MAYSCRIPT=true>
<NOEMBED>No Java 2 SDK, Standard Edition v 1.2 support for APPLET!! </NOEMBED>
</EMBED>

</COMMENT>

</OBJECT>

<h2>Demo description</h2>
<p>
This is a simple demo to insert and display elements into/out of the ConfigParameter class container
</p>
<form name="Formular">
Input Keyword:<input type=text value="VariablennameName" name="key" id="key" size="60" maxlength="200"><br>
Input Value:<input type=text value="Wert" name="wert" id="wert" size="60" maxlength="200"><br>

<input type=button value="eingeben" onClick="eingeben();">
<input type=button value="ausgeben" onClick="ausgeben();">
</form>
</body>
</html>

Danke schonmal im Voraus