[thelist] Problem with coldfusion and undefined vars

nagrom morgan at morgankelsey.com
Sun May 19 00:08:01 CDT 2002


cameron,

> I have a problem where when I check for a var that may or may not be set
> it returns an error.
>
> I tried making a <cfif isdefined(varname)>something to do with
> var</cfif> but it gives the same error that is isnt defined - why have
> isdefined if it wont accept it?
>

try <cfif isDefined("varname")>do something</cfif>
the variable you are testing for needs to be in quotes.

otherwise, CF will test for the existance of a variable named after the
value of yout varname variable.
make sense?


nagrom
~~~~~~~~~~~~~~~~~~~~~
http://www.morgankelsey.com





More information about the thelist mailing list