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> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270214 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

