Thanks... I did, and from what I'm reading everything is ok. This is
what has me confused.

On Fri, Aug 3, 2012 at 3:50 PM, sbetts <[email protected]> wrote:
> Check your function attributes.  I'm no expert but It looks like there could
> be an issue with the returntype and the returnformat.
>
>
> On Friday, August 3, 2012 2:56:47 PM UTC-4, Jason Allen wrote:
>>
>> 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

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

Reply via email to