Sliders
The
CFSLIDER
tag is a Java slider control you can
embed in your applications. It offers an efficient and user-friendly
way to select a value from a range of numeric values. Possible uses
include volume controls, time lines, and dollar amounts. The control
works by allowing users to drag the slider bar to the left to
decrease the value or to the right to increase the value. The slider
control is shown in Figure 10-2.
Figure 10-2. A typical slider control
To better illustrate how the CFSLIDER
control
works, consider Example 10-7.
Example 10-7. Using the CFSLIDER Control with No Background
<CFIF IsDefined('Form.Slider')> <CFOUTPUT>You submitted a slider value of <B>#Form.Slider#</B>.</CFOUTPUT> <HR NOSHADE> </CFIF> <CFFORM ACTION="Example10-7.cfm" METHOD="POST" ENABLECAB="Yes" NAME="MyForm" ENCTYPE="application/x-www-form-urlencoded"> <B>1</B> <CFSLIDER NAME="Slider" LABEL="Current slider value: %value%" REFRESHLABEL="Yes" RANGE="1,100" VALUE="50" SCALE="1" ALIGN="baseline" HEIGHT="50" WIDTH="500" FONT="Arial" FONTSIZE="14" BOLD="Yes" ITALIC="Yes" TEXTCOLOR="##000000" BGCOLOR="##FFFFFF" GROOVECOLOR="gray" NOTSUPPORTED="<B>Your web browser must support Java to view ColdFusion Java Applets</B>"><B>100</B> <P> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form"> </CFFORM>
The
CFSLIDER
tag accepts several parameters that determine how to display the slider control. The ...
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.