Rick,

Here is how I handle creating json content with ColdFusion.  I store
the json string in a variable (like variables.myJSONdata).  Then, I
output the variable as follows:

<cfcontent reset="yes" />
<cfheader name="expires" value="#now()#">
<cfheader name="pragma" value="no-cache">
<cfheader name="cache-control" value="no-cache, no-store, must-
revalidate">
<cfoutput>#myJSONdata#</cfoutput><cfabort /> <!--- The cfabort
prevents CF from adding anything else to the output, including
debugging info. --->

The first line clears anything CF might have rendered to the page up
to this point.  The second through fourth lines prevent the browser
from caching the AJAX response.  The last line outputs the json data
then immediately aborts CF processing, effectively stopping any
additional content being added onto the end.

HTH,
Carl


On Jan 28, 2:04 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> Perhaps I could ask you a question, Josh.
>
> I've been stuck on a CF/jQuery ajax issue
> for a day now and went to post my question
> to CF-Talk about the time it went down.
>
> Basically, I got everything working, but
> in my json response, beside the correct
> data, I get CF debugging code.  I have
> <cfsetting showdebugoutput = "no">, so that's
> not it.
>
> I just wonder what could be causing that to
> appear...any suggestions?j
>
> Rick

Reply via email to