I'd like to see those code snippets Jack :) I looked at ajaxCFC a while back 
but didn't have time to figure things out so seeing some examples would be a 
great help.

----- Original Message ----- 
From: "Jack Killpatrick" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
Sent: Friday, May 25, 2007 5:39 PM
Subject: [jQuery] Re: ColdFusion, ajax, post, jquery and whitespace



You might want to consider using ajaxCFC and returning json data. You
won't have to be concerned about white space, and it could come in handy
for a lot of other things:

http://www.robgonda.com/blog/projects/ajaxcfc/

It's very easy to setup/use and uses jquery. I can supply a few code
snippets if you're interested.

- Jack

Web Specialist wrote:
> I'll need to test an ajax post to validate if an account already
> exists in database. I'm using this code in action page:
>
> <cfsetting showdebugoutput="no">
> <cfprocessingdirective suppresswhitespace = "yes"
> pageencoding="ISO-8859-1">
> <cfheader charset="iso-8859-1" name="Expires"
> value="#GetHttpTimeString(Now())#">
> <cfcontent reset="true" type="text/plain;charset=ISO-8859-1">
> <cfset rndTest = RandRange(90,99)>
> <cfif rndTest MOD 2>
>     <cfoutput>#rndTest#</cfoutput>
> <cfelse>              <<<<<<<<<< LOOK HERE WITHOUT CFOUTPUT
>     no
> </cfif>
> </cfcontent>
> </cfprocessingdirective>
>
> Using that script returns(randomly) the "no" with 5 chars(maybe
> because <tab> for tags alignment). Including "no" inside <cfoutput
> returns 3. Why CF doesn't works properly removing whitespace?
>
> This is the jquery script:
>
>                     $.ajax({
>                         type: "post",
>                         url: "validateAccount.cfm",
>                         dataType: "html",
>                         data: inputs,
> ............
>
>
> Cheers


Reply via email to