> I find this simple, but only get one item to highlight.
>
> I am building a multiple select box from one query. From another query I
> pull a user account. I want to highlight those options that the user has
> previously selected while displaying the general list.
>
> It highlights one option, but not for the multiple selections previously
> made by the user:
>
> <select name="categories" multiple size="3">
> <cfloop list="#query.user_categories#" index="C" delimiters=",">
> <cfoutput query="showcategories">
> <option value="#cat_title#"<cfif trim(#cat_title#) is
> trim(#C#)>selected</cfif>>#cat_title#</option>
> </cfoutput>
> </cfloop>
You <cfif> to select the code is the problem - you're using IS which implies
one answer
Remember than <select multiple> returns a comma separates list (as long as
you POST the form), so you should treat it as a list
<option value="#cat_title#" <cfif ListFind(Cat_Title,c) gt
0>selected</cfif>>#Cat_Title#</option>
Should do the trick, although, not knowing your queries, I can't guarantee
it...
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.