Here's the code I've written so far in my attempt to use WDDX to pass around an array on a clustered server ... where I'm stuck is with getting the array out of the packet and appending to it. (more comments after the code):
<cfif NOT IsDefined('client.CartItems')> <!--- if no cart, create it and populate it with the first item ---> <cfscript> cart = ArrayNew(1); item = StructNew(); item.itemEmployersID = '#client.CART_ID#'; item.itemName = '#form.ItemName#'; item.itemQuanity = '#quanity#'; item.itemPrice = '#form.Price#'; item.itemCategoryID = '#form.Category_ID#'; CartItems = ArrayAppend(cart, item); </cfscript> <cfwddx action="CFML2WDDX" input="#CartItems#" output="client.CartItems" usetimezoneinfo="No"> <cfelse> <cfwddx action="WDDX2CFML" input="#client.CartItems#" output="Cart"> <cfscript> item = StructNew(); item.itemEmployersID = '#client.CART_ID#'; item.itemName = '#form.ItemName#'; item.itemQuanity = '#quanity#'; item.itemPrice = '#form.Price#'; item.itemCategoryID = '#form.Category_ID#'; CartItems = ArrayAppend(cart, item); </cfscript> <cfwddx action="CFML2WDDX" input="#CartItems#" output="client.CartItems" usetimezoneinfo="No"> </cfif> Right now I'm getting an error at line 79: CartItems = ArrayAppend(cart, item); Parameter 1 of function ArrayAppend which is now "YES" must be an array So I'm not sure how I get an array again and then append to it. H. ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists