DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

hal has posted 2 posts at DZone. View Full User Profile

Custom Tag For Outputting All American States As Select Box Options

03.26.2009
| 4062 views |
  • submit to reddit
        // description of your code here

<cfoutput>
<cfloop list="AL,AK,AK,AZ,AR,CA,CO,CT,DE,DC,FL,GA,HI,ID,IL,IN,IA,S,KY,LA,ME,MD,MA,MI,MN,MS,MO.MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,VI,WA,WV,WI,WY" index="aStateAbbreviation">
	<option value="#aStateAbbreviation#" <cfif aStateAbbreviation EQ attributes.state>selected="selected"</cfif>>#aStateAbbreviation#</option>
</cfloop>
</cfoutput>