You could simply loop and say something like <cfif Type_ID neq
rsSongEdit.Type_ID><option...></cfif>

However, repeating the selected item could be a feature. You could have
the currently selected item at the top of the box, followed by
------------ then all the available options including the one you've
currently selected. For example, think of the way MS Word lists fonts.



> -----Original Message-----
> From: Mitko Gerensky-Greene [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 30 December 2002 12:19 p.m.
> To: CF-Talk
> Subject: Loop question from a beginner
> 
> 
> Hello,
> 
> Here is a dumb beginners question.
> 
> I am working on a small site which has a database of songs. 
> For each song
> there are fields like type, language, tempo, etc. In the 
> admin page I need
> to allow editting of the type of song or its language or its 
> tempo. The data
> that was given to me was initially inputted manually into a SQL Server
> database so for each song there is at least one value for 
> type, language and
> tempo. I do show this value with the following code:
> 
>  <td class="text">
>         <select name="Type">
>           <cfoutput query="rsSongEdit">
>             <option value="#rsSongEdit.Type_ID#" <cfif
> (isDefined("rsSongEdit.Type") AND rsSongEdit.Type_ID EQ
> rsSongEdit.Type)>selected</cfif>>#rsSongEdit.Type#</option>
>           </cfoutput> </select> </td>
> 
> Now I want to be able to add also the rest of the values in 
> the recordset
> without repeating the value that is already selected. If 
> there is no value
> selected, then I want to be able to show the full list of 
> entries in the
> recordset.
> 
> How do I go about it?
> 
> Thanks in advance,
> 
> Mitko Gerensky-Greene
> 
> ****************************************************************
> "Make no search for water. But find thirst,
> And water from the very ground will burst."
> (A Persian mystic poet, quoted in Delight of Hearts, p. 77)
> 
> "The world is but one country and mankind its citizens"
> Baha'i Faith
> http://www.us.bahai.org
> *****************************************************************
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to