Yes sorry, I used the wrong function. If your searching for "1" listcontains will also pickup "11" "110" "31" etc. So use listfind to make sure you only find the exact occurance.
Russ > -----Original Message----- > From: Stephen Moretti (cfmaster) [mailto:[EMAIL PROTECTED] > Sent: 20 September 2004 07:40 > To: [EMAIL PROTECTED] > Subject: Re: [ cf-dev ] Slect Multiple > > Russ Michaels (Snake) wrote: > > >Put the selected sizes in a list, and then when you loop > over the query > >to create the selectlist options, check if each value is in the list. > > > >E.G > > > ><cfset selectedItems = Valuelist(GetItemSizes.FKSizeIF)> > > > ><select multiple name="ModifiedSize"> > ><cfoutput query="GetSizes"> > ><option value="#GetSizes.SizeID#" #IIF(Listcontains(SelectedItems, > >SizeID), DE('selected'),DE(''))#>#GetSizes.Size#</option> > ></cfoutput> > ></select> > > > > > > #IIF(ListFind(SelectedItems, SizeID),DE('selected'),DE(''))# > > Use listfind, not listcontains. Otherwise you could end up > in a whole world of pain. ;o) > > Stephen > > > > > > -- > These lists are syncronised with the CFDeveloper forum at > http://forum.cfdeveloper.co.uk/ > Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > CFDeveloper Sponsors and contributors:- > *Hosting and support provided by CFMXhosting.co.uk* :: > *ActivePDF provided by activepdf.com* > *Forums provided by fusetalk.com* :: *ProWorkFlow > provided by proworkflow.com* > *Tutorials provided by helmguru.com* :: *Lists > hosted by gradwell.com* > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]