Now when the user submits the form using either "update" or "delete", I want specific things to happen, so I wrote this:

<cfif isdefined("form.cartaction")>
<cfif form.cartaction eq "delete">
<cfloop collection="#session.cart#" item="i">
<cfif form.deleteitem#i#.checked> <!--- based on the way I named the items, this doesn't work in the IF statement for some reason, even if i throw cfoutput tags around the #i#--->
<cf_dropItem productid="#form.itemproductid#"> <!-- delete the item--->
</cfif>
</cfloop>
<cfelseif form.cartaction eq "update">
<cfloop collection="#session.cart#" item="i">
<cf_addItem productid = "#form.itemproductid#" quantity = "#form.itemquantity#i##"> <!-- update the item quantity, same problem as before, I know you can't do this, but its here to show you what I'm trying to do--->
</cfloop>
</cfif>
</cfif>

Please correct this to let me know how I can make it work! Its kind of urgent, so thanks for your time

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Invalid tag nesting configuration.
A query driven CFOUTPUT tag is nested inside a CFOUTPUT tag that also has a QUERY= attribute. This is not allowed. Nesting these tags implies that you want to use grouped processing. However, only the top-level tag can specify the query that drives the processing.