Hallo
Ich hatte ein funktionierendes Applet, dem ich wie folgt neue Werte übergeben habe:
function NeueWerteFurApplet()
{
applet = document.applets[0];
applet.setVisible("g", false);
applet.evalCommand("A = (0,"+t+")");
applet.evalCommand("B = (1,"+(t+m)+")");
applet.setVisible("g", true);
}
Das hat auch alles wunderbar geklappt.
Nun wollte ich das ganze auf xhtml-strict umbauen. Der xhtml-Code ist nun folgender (<applet> ist ja untersagt):
<div>
<!--[if !IE]> Hidden to IE -->
<object id="appletAll" classid="java:geogebra.GeoGebraApplet.class" type="application/x-java-applet"
archive=<?php echo '"'.$path.'Geogebra/geogebra.jar" ';?> width="671" height="476">
<param name="filename" value="geradeablesen.ggb" />
<param name="framePossible" value="false" />
<param name="showResetIcon" value="false" />
<param name="enableRightClick" value="false" />
<param name="showMenuBar" value="false" />
<param name="showToolBar" value="false" />
<param name="showToolBarHelp" value="false" />
<param name="showAlgebraInput" value="false" />
<!--<![endif]-->
<object id="appletIE" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="671" height="476">
<param name="code" value="geogebra.GeoGebraApplet" />
<param name="archive" value=<?php echo '"'.$path.'Geogebra/geogebra.jar" ';?> />
<param name="filename" value="geradeablesen.ggb" />
<param name="framePossible" value="false" />
<param name="showResetIcon" value="false" />
<param name="enableRightClick" value="false" />
<param name="showMenuBar" value="false" />
<param name="showToolBar" value="false" />
<param name="showToolBarHelp" value="false" />
<param name="showAlgebraInput" value="false" />
Sorry, the GeoGebra Applet could not be started. Please make sure that
Java 1.4.2 (or later) is installed and active in your browser
(<a href="http://java.sun.com/getjava">Click here to install Java now</a>)
</object>
<!--[if !IE]> Hidden to IE -->
</object>
<!--<![endif]-->
</div>
Und dazu hab ich folgende JS Funktion versucht:
function NeueWerteFurApplet(){
applet1 = document.getElementById('appletIE');
applet2 = document.getElementById('appletAll');
applet1.setVisible("g", false);
applet2.setVisible("g", false);
applet1.evalCommand("A = (0,"+t+")");
applet2.evalCommand("A = (0,"+t+")");
applet1.evalCommand("B = (1,"+(t+m)+")");
applet2.evalCommand("B = (1,"+(t+m)+")");
applet1.setVisible("g", true);
applet2.setVisible("g", true);
}
Leider funktioniert jetzt das ganze nicht mehr. Wie kann ich dem Applet trotz <object>-Tag die Werte übergeben beziehungsweise überschreiben?
In Google hab ich dazu nix gefunden (Falsch gesucht?).
Danke im Voraus!
Sam