> Hi All,
 
> I'm populating the select box using cfquery. I want a particular value 
> to be selected as default. How can i do that??
> It's very urgent. Please help 
me!!!

Are you using <cfselect>? If so, it has an attribute called selected. 

<cfselect name="thename" query="thequery" selected="#somevalue#">
</cfselect>

If you're using a regular select, just stick a conditional in the <option> in 
your loop. 

<cfif thisvalue EQ "#whatevervalueshouldbeselected#"> selected</cfif>

Somethin like that...

Will

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282391
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