Try IsDefined("COOKIE.#ATTRIBUTES.cookieComments#Name"). Of if you'd rather build the string outside of the IsDefined(), try IsDefined("#nameCookieVar#").

Let us know how it goes.

Ade
  -----Original Message-----
  From: Jake McKee [mailto:[EMAIL PROTECTED]
  Sent: 19 December 2003 23:22
  To: CF-Talk
  Subject: Create string that is used as variable

  Please help!

  I am trying to create a dynamic cookie name for a custom tag. I want to
  then refer to that dynamic cookie name in <CFIF isDefined()> statements.
  Something like:

  <CFSET NameCookieVar = "cookie." & "#ATTRIBUTE.cookieComments#" &
  "Name">

  <CFIF isDefined('#evaluate(nameCookieVar)#')>it's defined<CFELSE>it's
  not defined</CFIF>

  But I get this error:

  Variable cookie.myCookieName is undefined.

  Any ideas why? Shouldn't the evaluate( ) statement turn "nameCookieVar"
  into "cookie.myCookieName" so that the ifDefined can properly assess?

  What am I doing wrong?

  Thanks!
  Jake
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to