Returns TRUE if name can be called as a custom function; otherwise returns FALSE.
IsCustomFunction(name)
| Parameter |
Description |
|---|---|
| name |
The name of a custom function. The parameter value is the unquoted function name to check. |
<CFScript>
function myfunc(){ return ""; }
request.myfunc = myfunc;
if( IsCustomFunction( myfunc ))
WriteOutput( "myfunc is a UDF");
else
WriteOutput( "myfunc is NOT a UDF");
if( IsCustomFunction( request.myfunc))
WriteOutput( "request.myfuncis a UDF");
else
WriteOutput( "request.myfunc is NOT a UDF");
if( IsCustomFunction( yourfunc ))
WriteOutput( "yourfunc is a UDF");
else
WriteOutput( "yourfunc is NOT a UDF");
</CFScript>
<!--- This example shows the use of IsDate --->
<html>
<head>
<title>
IsDate Example
</title>
</head>
<body bgcolor = silver>
<H3>IsDate Example</H3>
<cfif IsDefined("FORM.theTestValue")>
<cfif IsDate(FORM.theTestValue)>
<H3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput>
is a valid date</H3>
<cfelse>
<H3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput>
is not a valid date</H3>
</cfif>
</cfif>
<form action = "isDate.cfm" method = "POST">
<P>Enter a string, and discover if
it can be evaluated to a date value.
<P><input type = "Text" name = "TheTestValue"
value = "<cfoutput>#Now()#</cfoutput>">
<input type = "Submit" value = "Is it a Date?" name = "">
</FORM>
</body>
</html>