Are you remembering to enclose the variable in quotations marks?

<cfif IsDefined("var")>
        ...
</cfif>

Marianne

-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 10:57 AM
To: Cf-Talk
Subject: IsDefined() problems


Just a quickie.

I have taken to coding in this way (when I think var may be undefined):

<cfparam name="var" default="">
<cfif var eq "">
        ... do something ...
</cfif>

instead of:

<cfif IsDefined(var)>
        ... do something ...
</cfif>

Does anyone else have trouble with IsDefined() or is it just me using it
wrong?

Paul


----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to