topical media & game development

talk show tell print

professional-javascript-18-AppletExample2.htm / htm

                <title>Applet Example</title>
              function changeAppletMessage() {   
                  var oApplet = document.getElementById("ExampleApplet");
                  var oTextbox = document.getElementById("txtMessage");
                  try {
                  } catch (oError) {
                      alert("Error caught: " + oError);
          <p>Enter the message you want to see in the applet. If you leave the textbox
          blank and click Set Message, it will cause an error.</p>
          <p><input type="text" id="txtMessage" size="10" />
          <input type="button" value="Set Message" onclick="changeAppletMessage()" />
          <object type="application/x-java-applet" code="ExampleApplet2.class"
                  width="100" height="100" border="1" id="ExampleApplet">
                  <applet code="ExampleApplet2.class" width="100" height="100" 

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.