|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building Slider Bar Controls
|
|
|
|
The CFSLIDER control is one of ColdFusion's Java applet-based CFFORM controls. With it you can create a slider control and define a wide range of formatting options for slider label text, as well as slider scale increments, range, positioning, and behavior.
As with CFTREE and CFGRID, input validation can be serviced with a JavaScript specified in the ONVALIDATE attribute.
|
|
|
|
Example: CFSLIDER control
|
|
|
The following example shows a simple CFSLIDER control:
<CFFORM NAME="Form1" ACTION="submit.cfm"
METHOD="Post">
<CFSLIDER NAME="myslider"
GROOVECOLOR="black"
BGCOLOR="white"
TEXTCOLOR="black"
FONT="Trebuchet MS"
BOLD="yes"
RANGE="0,1000"
SCALE="10"
VALUE="640"
FONTSIZE="24"
LABEL="Slider %value%"
WIDTH="400">
</CFFORM>
The resulting slider looks like this:
|
|
|
|
CFSLIDER form variable |
|
|
|
The value of the form variable passed from a CFSLIDER control to a ColdFusion application page is determined by the position of the slider on the scale. The form variable is passed as:
slider_name=slider_value
In the earlier example, the form variable would have been passed as:
myslider=slider_value
|
|
|
|
Formatting options with CFSLIDER |
|
|
|
As with other CFFORM controls, CFSLIDER offers many formatting, positioning, and alignment options. You can specify colors for the groove in which the slider knob moves, as well as label font name, size, boldface, italics, and color.
|
|
|
  
|
|
|
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.
|