Hi Erik,

As I see it, there is more than one way to prepare your select box.  At
a quick glance you look headed in the right direction.  Here is an
alternative example of how I have done it...

<SELECT id="aname" name="aname">
        <OPTION VALUE="-1">Select Something</OPTION>
        <CFLOOP QUERY="ItemQ">
                <CFIF PredeterminedValue EQ Item_ID>
                        <OPTION VALUE="#Item_ID#" selected="selected">
                        #Item#</OPTION>
                <CFELSE>
                        <OPTION VALUE="#Item_ID#">#Item#</OPTION>
                </CFIF>
        </CFLOOP>
</SELECT>


Brian

-----Original Message-----
From: erik tom [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 10:18 AM
To: CF-Talk
Subject: Dynamically prepolate the select box

I am dynamically buildin a select box . How can i prepopluate the data
so when it loads it will select the previously submited answer 
So far i got this 

<cfset selectOptions = selectOptions & '<option
value="#options#_#id#"<cfif qryAnswers.answer eq
#id#>selected</cfif>>#options#</option>'> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305019
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to