In the DB, it is just a varchar field. On 2/20/07, Ben Doom <[EMAIL PROTECTED]> wrote: > > If what is coming from the DB is a datetime object, it won't match a > formatted string. If your timelist contains things like "8:15", try > making your compare something more like: > > timeformat(getElectionProcedure1Ret.StartTime, "h:mm") eq i > > Or course, modify the time format to fit your data. > > --Ben Doom > > Bruce Sorge wrote: > > I am looping though a list that outputting that into a select control > (this > > is the JS and code that Charlie sent me last week. Thanks Charlie). The > loop > > works fine as does the select, but when I go to the edit page where I > want > > to select the item in the list that is in the database, it is not > working. > > This should really be no different than outputting a query to populate > the > > list, right? Here is the code below: > > <cfoutput> > > <select name="startTime" id="startTime" onchange="changeEndTime( > > this.selectedIndex);"> > > <cfloop list="#timelist#" index="i"> > > <option<cfif getElectionProcedure1Ret.StartTime IS > > i>Selected</cfif>>#i#</option> > > </cfloop> > > </select> > > </cfoutput> > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270217 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

