Using Bind with CFSELECT
Back in the olden days of CFML there was a script called CF_Select_Two_related. It allowed you to select from one dropdown <select > and populate the second dropdown <select > with related data from a query. 10 years ago it was really cool.
But now in ColdFusion 8 you can use the bind attribute and bind to a cfc passing data to it from other cfselects. Its AJAX so no page refresh and its very cool and useful. However, there is one pit fall you must know.
If you have so much as ONE comment in application dot cfm or cfc, the bind onload function will fail and the your cool dropdowns will just sit there.
Hopefully there is a plan to fix that in CF 10.
Here is an example from: http://blog.web-shorts.com/post/cfselect-binding-and-selectedvalues
name="city_id"
bind="cfc:cfcs.Remote.getCities({inventoryDetails:state_id}, #MyProperty.getCity_ID()#)"
bindOnLoad="true"
value="ID"
display="CityName"
/>
Remote.cfc
<cfargument name="state_id" type="numeric" required="true" />
<cfargument name="selectedValue" type="numeric" required="false" default="0" />
<cfset var rs = "" />
<cfif Val(Arguments.State_ID) IS 0>
<cfset rs = QueryNew("ID, CityName") />
<cfset QueryAddRow(rs) />
<cfset QuerySetCell(rs, "ID", 0) />
<cfset QuerySetCell(rs, "CityName", "Choose a state first...") />
<cfelse>
<cfquery name="rs" datasource="#DSN#">
SELECT
ID
, CityName
FROM (
SELECT
ID
, CityName
, CASE WHEN ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#Arguments.SelectedValue#" />
THEN 0
ELSE 1
END AS Sort
FROM City (NOLOCK)
WHERE State_ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#Arguments.State_ID#" />
) d
ORDER BY Sort, CityName
</cfquery>
</cfif>
<cfreturn rs />
</cffunction>

