Thank you. I that helps alot. Totally missed the selected=selected
error ><. Can I use the same code for the radio options?

Phil

On Thu, May 27, 2010 at 4:22 PM, Yuliang Ruan <[email protected]> wrote:
>
> btw, it should be just selected not selected="selected"Than
>
> <option value="clothes" <cfif form.choice is 
> "clothes">SELECTED</cfif>>Clothes</option>
>
> if your list of options is long and u need it to be hardcoded, u should put 
> it into a array of struct.   i.e.
>
> <cfset myChoices=[{value="nothing", text="Please Choose from Below"},
> {value="clothes", text="Clothes"},
> {value="sports",text="Sporting Goods Store"},
> etc etc etc ]>
>
> <select name="choice">
> <cfloop array="#myChoices#" index="thisChoice">
>    <option value="#thisChoice.value#" <cfif form.choice eq 
> thisChoice.value>SELECTED</cfif>>#thisChoice.text#</option>
> </cfloop>
> </select>
>
>
>
> of course even better would be these in a lookup db table
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334108
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to