GeoGebra 3.0 - Persian
| #### مشاهده كردن اعمال كاربر در مثال زیر اعمال کاربر در زیر اپلت مشاهده می شود. < <applet name="ggbApplet" code="geogebra.GeoGebraApplet" codebase="." archive="http://www.geogebra.org/webstart/dev/geogebra.jar" height="350" width="600" MAYSCRIPT> <param name="filename" value="geogebra_applet_java2javascript.ggb"> <param name="framePossible" value="true"> <param name="showAlgebraInput" value="false"> <param name="showMenuBar" value="true"> <param name="showToolBar" value="true"> Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and activated. (<a href="http://java.sun.com/getjava">click here to install Java now</a>) </applet> <script type="text/javascript"> // register add, remove, rename and update listeners var applet = document.ggbApplet; applet.registerAddListener("addListener"); applet.registerRemoveListener("removeListener"); applet.registerRenameListener("renameListener"); applet.registerClearListener("clearListener"); applet.registerUpdateListener("updateListener"); var strLength = 150; function addListener(objName) { document.listenerForm.textarea1.value = "add: " + objName + "\n" + document.listenerForm.textarea1.value.substring(0, strLength ); printConstructionState(); } function removeListener(objName) { document.listenerForm.textarea1.value = "remove: " + objName + "\n" + document.listenerForm.textarea1.value.substring(0, strLength ); printConstructionState(); } function renameListener(oldObjName, newObjName) { document.listenerForm.textarea1.value = "rename: " + objName + "\n" + document.listenerForm.textarea1.value.substring(0, strLength ); printConstructionState(); } function updateListener(objName) { strVal = document.ggbApplet.getValueString(objName); document.listenerForm.textarea2.value = strVal + "\n" + document.listenerForm.textarea2.value.substring(0, strLength ); } function clearListener() { document.listenerForm.textarea1.value = ""; document.listenerForm.textarea2.value = ""; document.listenerForm.textarea1.value = "construction cleared"; document.listenerForm.consState.value = ""; } function printConstructionState() { var applet = document.ggbApplet; var objNumber = applet.getObjectNumber(); var strState = "Number of objects: " + objNumber; for (i=0; i < objNumber; i++) { strName = applet.getObjectName(i); strType = applet.getObjectType(strName); strCommand = applet.getCommandString(strName); strState += "\n" + strType + " " + strName + ", " + strCommand; } document.listenerForm.consState.value = strState; } </script> <p></p> <form name="listenerForm"> <b>Construction State Listening<br> </b> <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td> update:<br> <textarea name="textarea2" cols="35" rows="5"></textarea> <br>add, remove, rename:<br> <textarea name="textarea1" cols="35" rows="5"></textarea> </td> <td>Current Construction State:<br> <textarea name="consState" wrap="physical" cols="30" rows="12"></textarea></td> </tr> </tbody> </table> <br> </form> <p><span style="font-size: small;">Created with <a href="http://www.geogebra.at" target="_blank">GeoGebra</a> by Markus Hohenwarter</span></p> </td> </tr> </tbody> </table> Related Topics 8.1.7 ارتباط اپلت هاي ژئوجبرا با جاوا اسكريپت
www.geogebra.org