<cfquery name="getCountries">
select country
from countries
</cfquery>

#getCountries.country# = "Australia"     (first record from the query)

#ValueList(getCountries.country)# = "Australia, Brazil, Canada, Denmark..."
(all the records from the query)




                                                                                       
                                  
                    "Paul Swingewood"                                                  
                                  
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]                
                       
                    tmail.com>                 cc:                                     
                                  
                                               Subject:     Re: [ cf-dev ] Whats wrong 
please?                           
                    08/07/2004 20:01                                                   
                                  
                    Please respond to                                                  
                                  
                    dev                                                                
                                  
                                                                                       
                                  
                                                                                       
                                  



HO HO HO! Its Christmas!

MAGIC - !

It works a treat now - I'm still not sure why it didn't work before but I
see you used valuelist() which I presume makes the data in the list more
sensible. I can only assume that the EQ wasn't being triggered as the items

didn't match as I expected...

Many thanks for this Duncan once again you've saved the day and whats left
of my sanity.
All I have to do know is replicate this for the colour and Roberts your
mothers brother ...

Regards - Paul




>From: [EMAIL PROTECTED]
>Reply-To: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Re: [ cf-dev ] Whats wrong please?
>Date: Thu, 8 Jul 2004 19:53:09 +0100
>
>
>how about this:
><select name="selectSize">
>      <cfloop index = "ListElement" list = "
>#ValueList(GetCartItems.ItemsItemSize)#">
>           <cfif #ListElement# eq GetCartItems.CartItemsItemSize>
><!---
>preselect it --->
>                <option value="#ListElement#"
>selected>#ListElement#</option>
>           <cfelse>
>                <option value="#ListElement#">#ListElement#</option>
>            </cfif>
>      </cfloop>
></select>
>
>
>
>
>
>                     "Paul Swingewood"
>                     <[EMAIL PROTECTED]        To:
>[EMAIL PROTECTED]
>                     tmail.com>                 cc:
>                                                Subject:     Re: [ cf-dev
]
>Whats wrong please?
>                     08/07/2004 19:38
>                     Please respond to
>                     dev
>
>
>
>
>
>Duncan I have changed the query to this  ....
>
>
><CFQUERY  NAME="GetCartItems" datasource="#application.dsn#">
>                      SELECT ItemIDPK, PartNum, ItemName, ItemCost,
>Quantity,
>                      tblitems.itemsize AS ItemsItemSize,
>tblCartItems.ItemSize AS
>CartItemsItemSize
>                      FROM tblItems, tblCartItems
>                      WHERE itemID = ItemIDPK
>                      AND CartIDPK = '#Cookie.CartID#'
>            </cfquery>
>
>To prevent confusion as to what is being selected
>
>And the loop now looks like this
>
><select name="selectSize">
>                                                               <cfloop
>index
>= "ListElement"
>
>list = "#GetCartItems.ItemsItemSize#"
>
>delimiters=",">
>
><cfif #ListElement# eq GetCartItems.ItemsItemSize>      <!---
preselect it
>--->
>
>       <option value="#GetCartItems.CartItemsItemSize#"
>selected>#GetCartItems.CartItemsItemSize#</option>
>
><cfelse>
>
>       <option value="#ListElement#">#ListElement#</option>
>
></cfif>
>                                                               </cfloop>
>                                                     </select>
>
>As I understand it the select is populated withthe list data from
>itemsItemSize. (which seems to work ok) Inside the loop I check to see if
>the value of the list from itemsItemSize is equal to that which is held in
>the cart (cartitemsitemsize) if it is then make this value selected.
>
>It doesn't work still :(
>
>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]
>



--
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]

Reply via email to