macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: Holding values in listbox

Subject: Re: Holding values in listbox
From: "Scott_thornton"
Date: Tue, 14 Aug 2007 02:31:32 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
What do you mean hold? I assume you mean select?

 For a select box:
 <select name="hospital">
 <cfoutput query="hospital">
        <option value="#hospital.hospital_code#" 
                <cfif hospital.hospital_code eq 
url.hospital_code>selected</cfif>>
                #hospital.hospital_name#
        </option>
 </cfoutput>
 </select>

 for a multiple select box its the same... the cfif statment will change 
slightly depending on how the items are previously stored... Perhaps a 
ListFindNoCase function would help.....


<Prev in Thread] Current Thread [Next in Thread>