Skip to content

Instantly share code, notes, and snippets.

@bennadel
Created March 25, 2014 11:06
IsNull() vs. IsDefined() For ColdFusion 9 Scope Detection
<!---
Check to see if the URL and FORM scopes exist using
both the new isNull() and the old isDefined() methods.
--->
<cfset check = {} />
<!--- Check for URL scope. --->
<cfset check.isUrlNull = isNull( url ) />
<cfset check.isUrlDefined = isDefined( "url" ) />
<!--- Check for FORM scope. --->
<cfset check.isFormNull = isNull( form ) />
<cfset check.isFormDefined = isDefined( "form" ) />
<!--- Check for scope existence. --->
<cfdump
var="#check#"
label="In-Page Check"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment