CAPDM Tutorial Applets |
Remote Control using JavaScriptOnly version information is available for this applet. Examples |
The applet can be invoked by embedding an APPLET tag into your HTML document (if you look at the source of this document you will see a working example you can copy). The table below details the basic parameters used and additional startup parameters that are specific to this applet.
<APPLET CODEBASE="../../../../classes" CODE="applet.capdm.qm.crosstabulation.CrossTabulationApp"
NAME="CrossTabulation" ALT="Cross Tabulation" WIDTH="360" HEIGHT="425"> <param name="NumOfDataSets" value="4">
<param name="DataFile1" value="data/capdm/weight.bpd">
<param name="Name1" value="Weight">
<param name="DataFile2" value="data/capdm/m14cs3.bpd">
<param name="Name2" value="McLune-Sales">
<param name="DataFile3" value="data/capdm/m14t6.bpd">
<param name="Name3" value="M14T6">
<param name="DataFile4" value="data/capdm/m2f6.bpd">
<param name="Name4" value="Simple"> </APPLET>
| Basic Parameters | Use |
| CODEBASE="../../../../classes" | The CODEBASE of the applet must point at the top-level classes directory in order for the applet to be found. |
| CODE="applet.capdm.qm.crosstabulation. CrossTabulationApp" |
This required attribute gives the name of the file that contains the applet's compiled Applet subclass. This file is relative to the base URI of the applet. |
| ALT="Cross Tabulation" | This optional attribute specifies any text that should be displayed if the browser understands the APPLET tag but can't run Java applets. |
| NAME="CrossTabulation" | This optional attribute specifies a name for the applet instance, which makes it possible for applets on the same page to find (and communicate with) each other. If you intend to use JavaScript/Applet scripting then the applet must be named a shown. |
| WIDTH="360" HEIGHT="425" | These required attributes give the initial width and height (in pixels) of the applet display area, not counting any windows or dialogs that the applet brings up. |
| Applet Startup Parameters | Use |
| <param name="NumOfDataSets" value="4"> | Specifies the number of datasets available. Tells the applets how many datasets there are. Applet then reads further info about those datasets from the remaining applet parameters (see below) |
| <param name="DataFile1" value="data/capdm/weight.bpd"> | Specifies the location of the datafile. The name of the parameter should be 'DataFileX' where X is 1 to the 'NumOfDataSets' parameter above (in this case 4. |
| <param name="Name1" value="Weight"> | The name to be used by the applet when referring to this dataset. It appears in the drop-down box of available datasets. |
For more information on the use of the APPLET tag and other attributes you can use but which are not listed above, visit the W3.org specification page at: APPLET tag in HTML 4.
This applet can be called into using Javascript 1.1 while running. Although JavaScript can call the Applet directly, some convenient JavaScript functions have been created which deal with the details of the communication. The following table lists the call Names which can be made, and gives examples of their use and results.
| API Call Name | Parameters | Use and Result |
| showAbout | none | javascript:showAbout(); Shows the version dialog box of
this applet. |