![MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference Download Page 214](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-cfml-language/coldfusion-4-5-cfml-language_reference_3287257214.webp)
190
CFML Language Reference
VALUE
Optional. The query column value for the list element. Used with the QUERY
attribute.
DISPLAY
Optional. The query column displayed. Defaults to the value of VALUE. Used with
the QUERY attribute.
PASSTHROUGH
Optional. HTML attributes that are not explicitly supported by CFSELECT. If you
specify an attribute and its value, the attribute and its value are passed to the
HTML code that is generated for the CFSELECT tag. See the Usage section for
more information about specifying values.
Usage
You can add standard and dynamic HTML FORM tag attributes and their values to the
CFSELECT tag by using the PASSTHROUGH attribute. These attributes and values are
passed directly through ColdFusion to the browser in creating a form.
If you specify a value in quotation marks, you must escape the quotation marks by
doubling them, for example,
PASSTHROUGH= "readonly= " "YES " " "
CFSELECT supports the JavaScript onClick event in the same manner as the HTML
INPUT tag:
<CFSELECT NAME="dept"
MESSAGE="You must select a department name"
QUERY="get_dept_list"
VALUE="dept_name"
onClick="JavaScript_function">
Example
<!--- This example shows the use of CFTREE, CFSELECT and CFGRID in a
CFFORM. The query takes a list of employees, and uses CFTREE and CFSELECT
to display the results of the query. In addition, CFGRID is used
to show an alternate means of displaying the same data --->
<!--- set a default for the employeeNames variable --->
<CFPARAM NAME="employeeNames" DEFAULT="">
<!--- if an employee name has been passed from the form,
set employeeNames variable to this value --->
<CFIF IsDefined("form.employeeNames") is not "False">
<CFSET employeeNames = form.employeeNames>
</CFIF>
<!--- query the datasource to find the employee information--->
<CFQUERY NAME="GetEmployees" DATASOURCE="cfsnippets">
SELECT Emp_ID, FirstName, LastName, EMail, Phone, Department
FROM Employees where lastname
<CFIF #employeeNames# is not "">= ’#employeeNames#’</CFIF>
</CFQUERY>
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...