Evaluates a string value to determine if the variable named in the string value exists. IsDefined returns TRUE if the specified variable is found, FALSE if not found.
IsDefined("variable_name")
A string value, the name of the variable you want to test for. This value must always be enclosed in quotation marks.
<!--- This example shows the use of IsDefined --->
<HTML>
<HEAD>
<TITLE>
IsDefined Example
</TITLE>
</HEAD>
<BODY bgcolor=silver>
<H3>IsDefined Example</H3>
<CFIF IsDefined("FORM.myString")>
<P>Because the variable FORM.myString has been defined, we
can now show its contents. This construction allows us to place a FORM
and its resulting action template in the same template, while using
IsDefined to control the flow of template execution.
<P>The value of "FORM.myString" is <B><I><CFOUTPUT>#FORM.myString#
</CFOUTPUT></I></B>
<CFELSE>
<P>During the first time through this template, the variable
"FORM.myString" has not yet been defined, so it is not evaluated.
</CFIF>
...
</BODY>
</HTML>