il mio luogo di sviluppo...
1. <cffunction name="countryDropDown" output="true">
2. <cfargument name="name" required="true">
3. <cfargument name="id" required="true">
4. <cfargument name="value" required="true">
5. <cfargument name="html" required="false">
6.
7. <cfset countryList = q("select * from country order by des_country")>
8.
9. <cfif NOT IsDefined('html')>
10. <cfset html = ''>
11. </cfif>
12.
13. <cfoutput>
14. <select name="#name#" id="#id#" #html#>
15. <option value="">-- select a country --</option>
16. <cfloop query="countryList">
17. <option value="#countryList.country#"
18. <cfif value EQ #countryList.country#>SELECTED</cfif>
19. >#countryList.des_country#</option>
20. </cfloop>
21. </select>
22. </cfoutput>
23.
24. </cffunction>