Never mind--I have simply added a hidden ID field in the form's looped section 
(the one handling the checkbox generation...)

Anyway, I set up my database per your suggestion, and it is working 
brilliantly!  I am handling the looped Insert statement like this:  feel free 
to let me know if it can be done in an easier way:

<cfparam name="checkedList" default="">
<cfparam name="pageIDList" default="">
        <cfquery name="Pages" datasource="#request.dsn#">
        SELECT *
        FROM Pages
        ORDER BY PageName ASC
        </cfquery>      
                        
<cfloop query="Pages">
<cfoutput>
<cfset checkedList = listappend(checkedList, FORM[ "A#PageID#" ])>
<cfset pageIDList = listappend(pageIDList, FORM[ "B#PageID#" ])>
</cfoutput>
</cfloop>
                
<cfloop index = "Counter" from = "1" to = "#ListLen(checkedlist)#">
        <cfquery datasource="#request.dsn#">
        INSERT INTO Links (LogoID, PageID, Checked)
        VALUES ( 
                '#FORM.LogoID#',
                '#ListGetAt(pageIDList, Counter)#',
                '#ListGetAt(checkedList, Counter)#'
                  )
        </cfquery>
</cfloop>       


Anyway, thanks for all of the help.  I really do appreciate it!

Joel


>If you are returning a POST instead of a GET, I'd name all the 
>checkboxes the same.  Make the values the page IDs.  You'll get a 
>comma-delimited list which you can parse into a large insert.
>
>If you have to name them individually, prefix them with something 
>similar (ie page_(ID) so, page_23, page_9, etc.).  You can loop over the 
>formfields list and extract them.
>
>Sorry if that's not clear, but I'm pretty tired.  :-)
>
>--Ben
>
>Joel Watson wrote:
>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273964
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to