You can't have CFSCRIPT based functions in a CFC.  They have to be tag
based.  This is what you need:

<cffunction name="isAlphanumeric">
  <cfargument name="str" />
  <cfreturn REFind("[^a-zA-Z0-9]", arguments.str) EQ 0 />
</cffunction>
  -----Original Message-----
  From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 23, 2003 3:05 PM
  To: CF-Talk
  Subject: Re: CFCs and UDFs

  Thanks Barney...but HUH!!! ;-)

  Is this what you mean (the cfscript having been the original UDF)??

  <cfcomponent>
    <cffunction name="IsAlphanumeric" ....>
      <cfscript>
         function IsAlphanumeric(str) {
           if (ReFindNoCase("[^a-z0-9}", str) eq 0)
             return true;
           else
             return false;
           }
      </cfscript>

      <cfset MyVar = IsAlpaNumeric(argument.String)>
      <cfreturn MyVar>
    </cffunction>
  </cfcomponent>

  Thanks

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to