Thank you both for the suggestions. In the end I decided to do away with passing in a name for the cart (since people only have one cart at a time, there really isn't a need to uniquely identify the cart).
- Jared ----- Original Message ----- From: "Jared Stark" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 11, 2002 1:30 PM Subject: Setting a dynamic variable... | Hi all, | | I have the following inside a Custom Tag: | | "session.#attributes.CartName#" = StructNew(); | "session.#attributes.CartName#.items = ArrayNew(); | | Which seems to work fine, however if I try the following line: | | "session.#attributes.CartName#.items[1] = "blahblahblah"; | or | <cfset "session.#attributes.CartName#.items[1]" = "blahblahblah"> | | I get the following error: | | --- | Cannot set dynamic variable with name 'session.myCart.items[1]'. The variable name is illegal. Variable names must start with a letter and can include only letters, numbers, and underscores. | --- | | Obviously I am passing in the name 'myCart' as an attribute to the custom tag. Any ideas why it won't let me set any values in the array? | | Much thanks, | Jared | | | ______________________________________________________________________ Why Share? Dedicated Win 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=coldfusionc 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

