paul, you seem to be looping through a list (getCartItems.ItemSize), which
if my reading of your db query is correct, has only one value?  here's the
logic:

loop through list
   if listitem = list
      item is selected
  else
     item is not selected
  end-if
end-loop

What exactly is in #getCartItems.ItemSize#?  Are you sure that's what you
want to be looping through?  I think the loop should be through a different
list altogether, that of all possible shoe sizes, not the shoe size for the
items currently in the database.




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



I have a field that stores the size of a shoe selected from a drop down
list
(itemsize)
If the user changes the size they click a button to add this change to the
database all works ok so far and the change is in the database. However the

form is redisplayed and it would be nice to have the changes reflectd in
the
drop down list  so ....

<select name="selectSize">
   <cfloop index = "ListElement"
      list = "#GetCartItems.ItemSize#"
      delimiters=",">
   <cfif #ListElement# eq GetCartItems.ItemSize>  <!--- the value in te
database matches the one in the list --->
      <option value="#GetCartItems.ItemSize#"
selected>#GetCartItems.ItemSize#</option>
   <cfelse>
      <option value="#ListElement#">#ListElement#</option>
   </cfif>
</cfloop>
</select>

So what am I doing wrong here ...?

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]

Reply via email to