anybody.....


On Mon, Jul 30, 2012 at 10:33 AM, Jason King <[email protected]> wrote:
> Hi Alan,
>
> I have a smaller, simpler example that has the same problem.
> Hopefully this is enough and I'm ok with posting it up here in case
> anybody else wants to chime in.
>
> As a test, I've created a cfc called 'functions' and within it a
> function that checks an email address for some basic components.
> 'checkEmailValid'
>
> If I don't include the '&__BDRETURNFORMAT=wddx' argument in the url, I
> get an error.  Otherwise, you'll get the XML back.
>
> Here's a URL you can hit to check
> http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]
>
> Here's the code.
>
> <!--- application.cfc --->
> <cfset Application.functions = CreateObject("component",
> "config.cfc.functions") />
>
>
> <!--- functions.cfc --->
>
> <cfcomponent displayname="functions" hint="details.at component for
> general functions">
>
>         <cffunction name="checkEmailValid" returntype="struct" output="no"
> access="remote" returnformat="plain">
>
>                 <cfargument name="email" type="string" required="true" 
> default=""
> hint="user email" />
>
>                 <cfset checkEmailValidResults=StructNew()>
>                 <cfset checkEmailValidResults.error = 0>
>
>                 <cfset var local = StructNew()>
>                 <cfset local.email = "#arguments.email#">
>
>                         <cfif (find('@',local.email) eq 0) OR 
> (find('.',local.email) eq 0)
> OR (local.email eq "")>
>                                 <cfset checkEmailValidResults.error = 1>
>                         </cfif>
>
>                 <cfreturn checkEmailValidResults>
>
>          </cffunction>
>
> </cfcomponent>

-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

Reply via email to