Hank -
you have two options...
1) Use the built in CFSELECT tag (this will need to be within a CFFORM tag
rather than the standard FORM. eg:
<CFFORM NAME="blah" ACTION="blah" METHOD="post">
<CFSELECT NAME="status" QUERY="readstatus" DISPLAY="name"
VALUE="status"></CFSELECT
</CFFORM>
or
2) Use the code you already have but move the CFOUTPUTs so they are either
side of the <option... code and define the query as below:
<select name=status>
<cfoutput query="readstatus">
<option value="#status#">#name#
</cfoutput>
</select>
Either of these will get you sorted!
Jon Cooper
Visation Ltd
> I'm trying to dynamically populate a select list but it's only
> displaying the first item in the table. Here's my query:
[quoted text clipped - 14 lines]
>
> Thanks!
Hank - 23 Jul 2004 15:17 GMT
> I'm trying to dynamically populate a select list but it's only
> displaying the first item in the table. Here's my query:
[quoted text clipped - 14 lines]
>
> Thanks!
You forgot to reference the query in your cfoutput tag. Try this:
<cfoutput query="readstatus">
<select name=status>
<option value="#readstatus.status#">#readstatus.name#
</select>
</cfoutput>
BobCobb - 24 Jul 2004 08:15 GMT
You would want to hope there weren't 50+ records, or that would look funny :-)
Bob
"ctrl+alt+delete" <thenetwerx@REMOVEmsn.com> wrote in message
> You forgot to reference the query in your cfoutput tag. Try this:
>
[quoted text clipped - 3 lines]
> </select>
> </cfoutput>
Jon Cooper - 24 Jul 2004 08:16 GMT
Ctrl...
Just to mention ..your solution wouldn't work because it would output a
select list for every record returned by the query!
see my notes above,
Jon
> > I'm trying to dynamically populate a select list but it's only
> > displaying the first item in the table. Here's my query:
[quoted text clipped - 22 lines]
> </select>
> </cfoutput>