I'm attempting to create a loop to populate a select list to display a range of years.
For some reason, the select list works, but is not displaying any of the years that would be generated from the loop.
________________________________
<select name="year">
<option value="0"
<CFIF (isDefined("FORM.year") AND "0" EQ FORM.year)>
selected
</CFIF>
>
-Select a Year-
</option>
<CFLOOP index="index" from="2009" to"1900" step="-1">
<CFOUTPUT>
<option value="#index#"
<CFIF (isDefined("FORM.year") AND
"#index#" EQ FORM.year)>
selected
</CFIF>
>
#index#
</option>
</CFOUTPUT>
</CFLOOP>
<option value="< 1900"
<CFIF (isDefined("FORM.year") AND "< 1900" EQ FORM.year)>
selected
</CFIF>
>
< 1900
</option>
</select>
_____________________________________________
All I get in the drop down is the parts above and below the loop, but nothing from the loop itself. Nor do I get any errors.
For some reason, the select list works, but is not displaying any of the years that would be generated from the loop.
________________________________
<select name="year">
<option value="0"
<CFIF (isDefined("FORM.year") AND "0" EQ FORM.year)>
selected
</CFIF>
>
-Select a Year-
</option>
<CFLOOP index="index" from="2009" to"1900" step="-1">
<CFOUTPUT>
<option value="#index#"
<CFIF (isDefined("FORM.year") AND
"#index#" EQ FORM.year)>
selected
</CFIF>
>
#index#
</option>
</CFOUTPUT>
</CFLOOP>
<option value="< 1900"
<CFIF (isDefined("FORM.year") AND "< 1900" EQ FORM.year)>
selected
</CFIF>
>
< 1900
</option>
</select>
_____________________________________________
All I get in the drop down is the parts above and below the loop, but nothing from the loop itself. Nor do I get any errors.
