Example Function Button

The main goal of this example is to show how to use FunctionButton.class. For a listing of the attributes associated with the Function Button Widget, click on FunctionButton.class. This example is identical to an earlier numeric field example and an earlier check box example with the addition of function buttons (Btn1), (Btn2), and (Btn3). Instead of repeating everything from the earlier examples, this example will only discuss Btn1, Btn2, and Btn3. Reference \Projects\Field\ReadMe.htm for information on the radio buttons, bargraph, slider, numeric field, and META tags of Figure 1. Reference \Projects\CheckBox\ReadMe.htm for information on the check box and line plot of Figure 2. Here is what the html pages look like in a "WYSIWYG" tool:


Figure 1.


Figure 2.

In Figure 1, to create function buttons named Btn1 and Btn2 that perform unique hrefs, the following is used:

<APPLET CODE="FunctionButton.class" WIDTH="80" HEIGHT="25" NAME="Btn1">
<PARAM NAME="href" VALUE="Amulet:UART.invokeRPC(3)">
<PARAM NAME="fontSize" VALUE="3">
<PARAM NAME="fontStyle" VALUE="bold">
< PARAM NAME="label" VALUE="RPC(3)">
<PARAM NAME="onButtonPress" VALUE="depress">
< /APPLET>

<APPLET CODE="FunctionButton.class" WIDTH="90" HEIGHT="25" NAME="Btn2">
<PARAM NAME="href" VALUE="Back.htm">
<PARAM NAME="fontSize" VALUE="3">
<PARAM NAME="fontStyle" VALUE="bold">
<PARAM NAME="label" VALUE="HTML Link">
<PARAM NAME="onButtonPress" VALUE="depress">
</APPLET>

Pressing Btn1 will invoke an external function by using the href function Amulet:UART.invokeRPC(3).
Pressing Btn2 will link to Back.htm which is another uHTML page (Figure 2) by using the href function Back.htm.

In Figure 2, to create a function button named Btn3 that performs a third type of href, the following is used:

<APPLET CODE="FunctionButton.class" WIDTH="56" HEIGHT="25" NAME="Btn3">
<PARAM NAME="href" VALUE="Amulet:back()">
<PARAM NAME="fontSize" VALUE="3">
<PARAM NAME="fontStyle" VALUE="bold">
<PARAM NAME="label" VALUE="BACK">
<PARAM NAME="onButtonPress" VALUE="depress">
</APPLET>

Pressing Btn3 will return to the calling page by using the href function Amulet:back().

NOTES:



Amulet HTMLCompiler,
Copyright © 2000-2004 by
Amulet Technologies, LLC

Back to Welcome - Contact Amulet - Amulet Home