OK,  so I'm just looking at this:

<cfif session.newcart is "no">

<CFSCRIPT>
        
        session.cart = ArrayNew(1);
        
        CartItems = ArrayAppend(session.cart, item);
        session.newcart="yes";
        
</CFSCRIPT> 

                        <cfelse>

                <CFSCRIPT>
        
                                CartItems = ArrayAppend(session.cart, item);
        
                </CFSCRIPT> 
</cfif>


Part I of the conditional works fine ... a new array called session.cart is
created.  A structure called item is then added to the cart.

Once the cart is created, Part 2 of the conditional should execute. And it
does.  I've confirmed this beyond doubt.  Part 2 executes when it should.  A
second structure at this point should be added to the array, but the array
is not getting any bigger.

I looked at the Hal Helms tutorial on structures, as Andre suggested, but I
don't think that's the issue (though it's a very fine tutorial).  The
structures are being created fine.  

The array is just not getting bigger, as it should.  If I check ArrayLen()
after trying to add a second item, the Len remains 1.

I just find it a total mystery as to why the Array wouldn't get appended,
especially when I have this same code working in two other places.

I'm now on my third day of trying to figure this out. Pretty soon I won't
have any hair and my wife will be very upset. :-)


H.
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to