I have a couple of question in regards to an Update form and an Insert form
that has some text boxes and 3 drop down boxes.  2 of the drop down boxes
have the option of Multiple selections.  The inputs on the form update 3
tables in a database.

I am dynamically populating the Category Name from a query and passing the
Category ID to the query to be updated.  Say the query returns id's 9, 4.
How do I get the list box below to show the 2 selected Category Names and
list them at the top of the list box?  Currently, I get the first entry
selected, but not the second and it doesn't show selected at the top of the
list.

<SELECT NAME="id_mom_category" multiple size="2">
        <CFOUTPUT QUERY="GetCategoryName">
                <OPTION VALUE="#GetCategoryName.id_mom_category#"
                        <CFIF GetCategoryName.id_mom_category IS
                                GetUserDetails.id_mom_category>
                                        SELECTED
                        </CFIF>>
                #GetCategoryName.mom_category#
        </CFOUTPUT>
                </option>
</SELECT>

Then, how do I write the query to update/insert the data into the database
if a user selects multiple entries from the list box?

Example of one of the drop down boxes on the insert form:
<cfquery name="GetSubwebName" Datasource="#dsn#">
        SELECT id_subweb, subweb_name
        From    mkt_rollovr_subweb_ref
</cfquery>

<td><SELECT NAME="id_subweb" multiple size="2">
        <CFOUTPUT QUERY="GetSubwebName">
                <OPTION VALUE="#GetSubwebName.id_subweb#">
                        #GetSubwebName.subweb_name#
                </option>
        </CFOUTPUT>
       </SELECT>

Insert Query:
I actually have 3 queries, but this is the only 1 that accepts multiple
entries.

<CFQUERY NAME="Insert_Cat_Views" Datasource="#dsn#">
        Insert into mom_category_views
                (username, id_subweb, id_mom_category)
        VALUES
                ('#FORM.username#, #FORM.id_subweb#, #FORM.id_mom_category#)
</cfquery>


Any help or suggestions would be greatly appreciated.

Thank you,
> Issac Rosa
> 
> 
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to