Adobe COLDFUSION 9 Manual page 852

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
In HTML forms, you can specify maximum, minimum, and increment values, to help you quickly filter complex
results. The available slider controls are: Vertical, with controls that can be adjusted to the top or bottom; Horizontal,
with controls that can be adjusted to the left or right; Tip, that displays the values as data tips; and Snapping, that moves
in incremental values.
Manipulating slider at runtime
The following code illustrates how you can manipulate a slider at runtime:
<script language="javascript">
//use Coldfusion AJAX functions
var sliderChange = function(slider,value)
{
//get slider name
slidername = slider.getId();
//get slider value
currValue = ColdFusion.Slider.getValue(slidername);
//set a new slider value
newValue = parseInt(currValue+10);
ColdFusion.Slider.setValue(slidername,newValue);
//hide slider
if(confirm("Do you want to hide slider?"))
{
ColdFusion.Slider.hide(slidername);
}
//show slider
if(confirm("Do you want to show slider?"))
{
ColdFusion.Slider.show(slidername);
}
//disable slider
if(confirm("Do you disable the slider?"))
{
ColdFusion.Slider.disable(slidername);
}
//enable slider
if(confirm("Do you enable the slider?"))
{
ColdFusion.Slider.enable(slidername);
}
}
var sliderDrag = function(slider)
{
//get slider name
slidername = slider.getId();
document.getElementById('currentSliderValue').innerHTML =
<font color='red'><strong>" + ColdFusion.Slider.getValue(slidername) + "<strong></font>";
}
</script>
<br>
<cfform name="frm1">
Last updated 8/5/2010
"Current Slider value :
847

Advertisement

Table of Contents
loading

Table of Contents