Ar$e ... I missed the 'multiple' in the select - it's Monday morning :)
Andy
Quoting Andy Allan <[EMAIL PROTECTED]>:
> Wouldn't this do the trick...
>
> <select multiple name="ModifiedSize">
> <cfoutput query="GetSizes">
> <cfif SizeID eq GetItemsizes.FKSizeID>
> <option value="#SizeID#" selected="selected">#Size#</option>
> </cfif>
> <option value="#SizeID#">#Size#</option>
> </cfoutput>
> </select>
>
> And it's certainly better performance wise to use a normal cfif over IIF.
>
> Andy
>
> Quoting "Russ Michaels (Snake)" <[EMAIL PROTECTED]>:
>
> > 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>
> >
> > Russ
> >
> > > -----Original Message-----
> > > From: Paul Swingewood [mailto:[EMAIL PROTECTED]
> > > Sent: 19 September 2004 21:11
> > > To: [EMAIL PROTECTED]
> > > Subject: [ cf-dev ] Slect Multiple
> > >
> > > I have a modify form. I want to show the multiple values of a
> > > select that were cosen when the user entered the data.
> > >
> > > I have this....
> > >
> > > <!--- This query gets those sizes that were selected --->
> > > <cfquery name="GetItemSizes" datasource="#application.dsn#">
> > > SELECT FKSizeID,
> > > FKItemID
> > > FROM tblItemSizes
> > > WHERE (FKItemID = #url.ItemID#)
> > > </cfquery>
> > >
> > > <!--- This query gets all possible sizes --> <cfquery
> > > name="GetSizes" datasource="#application.dsn#">
> > > SELECT SizeID, Size
> > > FROM tblSizes
> > > WHERE 0=0
> > > ORDER BY size ASC
> > > </cfquery>
> > >
> > > Ok now show the selection ...
> > >
> > > <tr>
> > > <td valign="top">Size :</td>
> > > <td valign="top">
> > > <select multiple name="ModifiedSize">
> > > <cfoutput query="GetSizes">
> > > <cfif GetSizes.SizeID eq #GetItemsizes.FKSizeID#> <option
> > > value="#SizeID#" selected>#GetSizes.Size#</option> <cfelse>
> > > <option value="#GetSizes.SizeID#">#GetSizes.Size#</option>
> > > </cfif>
> > > </cfoutput>
> > > </select>
> > > </td>
> > > </tr>
> > >
> > > The thing is this shows only one selection :-(
> > >
> > > How do I loop coorectly to show all of the previous selections?
> > >
> > > Regards - Paul
> > >
> > >
> > >
> > > --
> > > 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]
> >
>
>
> --
> [EMAIL PROTECTED]
> www.creative-restraint.co.uk
>
> --
> 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]
>
--
[EMAIL PROTECTED]
www.creative-restraint.co.uk
--
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]