Yeah I forgot to stick that in there. Woops
There are two major products that come out of Berkeley: LSD and [Unix] BSD. We don't believe this to be a coincidence. Doug Brown ----- Original Message ----- From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, January 08, 2002 12:17 PM Subject: RE: problem with dynamic data in my select boxes > Errr, won't this mean that every value AFTER the correct one will also > be marked selected? Sure the browser will use the first one, but that > i'snt good. I'd add a <cfset select = ""> before the cfif. > > -Raymond > > > <cfset thisDecisionID = getReviewers.decisionID> > > <CFLOOP query="getDCodes"> > > <CFIF getDCodes.decisionID EQ thisDecisionID> > > <CFSET select = "SELECTED"> > > </CFIF> > > <option value="#decID#" #select#> > > > > > > > > > > There are two major products that come out of Berkeley: LSD > > and [Unix] > > BSD. We don't believe this to be a coincidence. > > > > > > > > Doug Brown > > ----- Original Message ----- > > From: "Billy Cravens" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Tuesday, January 08, 2002 11:37 AM > > Subject: Re: problem with dynamic data in my select boxes > > > > > > > When you start iterating through your inner query, it "loses its > > place" in > > > the first query - meaning, referencing a column from the outtermost > > query > > > and expecting it to know what row it is on. Like referencing > > query.column > > > outside of a query loop, it defaults to the first row's value. You > > should > > > save the column value in a local variable before entering the inner > > query > > > loop: > > > > > > <cfset thisDecisionID = getReviewers.decisionID> > > > <CFLOOP query="getDCodes"> > > > <option value="#decID#" > > > <CFIF getDCodes.decisionID EQ > > > thisDecisionID>selected</cfif> > > > > > > > > > ----- Original Message ----- > > > From: "Tammy Hong" <[EMAIL PROTECTED]> > > > To: "CF-Talk" <[EMAIL PROTECTED]> > > > Sent: Tuesday, January 08, 2002 12:52 PM > > > Subject: problem with dynamic data in my select boxes > > > > > > > > > > Hi everyone, > > > > > > > > Can someone please point to me what the problem here is? > > I basically > > have > > > > two queries. One pulls out the record set for a > > particular ID number > > and > > > is > > > > grouped in a cfoutput based on another ID number. The problem is > > that when > > > I > > > > have more than one dynamically populated select box with the HTML > > below, > > > the > > > > ID that is selected is not the right one. It will select the first > > > > decID of the first reviewer that is outputted. I am sure > > this is the > > right > > > > way to reference the variables. Can someone point me to the > > incorrect > > > logic? > > > > Please! I'm about to pull my hair out. > > > > > > > > > > > > See below: > > > > <CFOUTPUT query="getReviewers" group="reviewerID"> > > > > <select name="decID"> > > > > <option value="0">[Select a decision]</option> > > > > <CFLOOP query="getDCodes"> > > > > <option value="#decID#" <CFIF getDCodes.decisionID EQ > > > > getReviewers.decisionID>selected</cfif> > > > > >#trim(decisionDescription)#</option> > > > > </CFLOOP> > > > > </select> > > > > </CFOUTPUT> > > > > > > > > Tammy > > > > > > > > > > ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists