Hi
John,
To go
one step further, here's what I do to prepopulate a listbox when both the main
form and listbox contents are being pulled from two seperate
queries.
<cfoutput query="MainDataQuery">
<select name="DropdownVariable" size="1">
<cfset tempID = ID>
<!-- ID variable is from MainDataQuery -->
<cfloop
query="DropdownQuery">
<option <cfif ID eq
TempID>Selected<cfif>> <!-- ID is from
DropdownQuery and TempID is temp variable which is from
MainDataQuery-->
#whatever_data#
</cfloop>
</select>
</cfloop>
</select>
</cfoutput>
Hope
this helps on this or future projects :)
Sam
Alexander, Webmaster
Hillcrest Health System -
Waco, Texas
-----Original Message-----
From: Ivanoff, John [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 08:42
To: '[EMAIL PROTECTED]'
Subject: RE: list box multiple select.Thanks.Having worked with @$p, I sometimes try to make CF harder that it is.John-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jacob Cameron
Sent: Wednesday, February 18, 2004 7:54 PM
To: [EMAIL PROTECTED]
Subject: RE: list box multiple select.<option value="#id#" <cfif ListFind(valueFromDB,ID) gt 0>selected</cfif>>#name#</option>All you do is put the word selected in the option for the select. As long as the select is set to multiple, they will be selected.Jacob
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ivanoff, John
Sent: Wednesday, February 18, 2004 4:08 PM
To: '[EMAIL PROTECTED]'
Subject: list box multiple select.I'm having a memory lapse.I have a list box with three selections available. let's say a,b,c (values from a database)you are allowed to make multiple selections. say a,cI have a form to edit this information and I can (through dream weaver) have a list box select one value say a but I have no idea how to select a,cThanksJohn
