Created
March 25, 2014 11:06
IsNull() vs. IsDefined() For ColdFusion 9 Scope Detection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
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