<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: AJAX with Coldfusion 7</title>
	<atom:link href="http://johnmee.com/2008/06/ajax-coldfusion-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnmee.com/2008/06/ajax-coldfusion-7/</link>
	<description>A Programmer in Sydney, Australia</description>
	<lastBuildDate>Wed, 04 Jan 2012 10:43:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: John</title>
		<link>http://johnmee.com/2008/06/ajax-coldfusion-7/comment-page-1/#comment-254</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 01 Jul 2008 10:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnmee.com/?p=52#comment-254</guid>
		<description>A guy at work (thanks Kevan) offered me this solution for CF7 which is much better than my dirty hack. It neatly avoids, the evaluate, the whitespace, the debugging....  noice!

&lt;pre&gt;&lt;code&gt;
&lt;cfparam name=&quot;url.method&quot;&gt;

&lt;!--- This function is placed in the &quot;variables&quot; scope. ---&gt;
&lt;cffunction name=&quot;hello&quot; output=&quot;false&quot;&gt;
      &lt;cfreturn &quot;hollow ddorld&quot;&gt;
&lt;/cffunction&gt;

&lt;cfset result = &quot;&quot;&gt;
&lt;cfif structKeyExists(variables,url.method)&gt;
      &lt;cfinvoke method=&quot;#url.method#&quot; returnvariable=&quot;result&quot;&gt;
&lt;/cfif&gt;

 &lt;!--- Clear any previously generated output and output the result. ---&gt;
&lt;cfsetting showdebugoutput=&quot;false&quot;&gt;
&lt;cfcontent reset=&quot;true&quot;&gt;&lt;cfoutput&gt;#result#&lt;/cfoutput&gt;&lt;cfabort&gt;
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>A guy at work (thanks Kevan) offered me this solution for CF7 which is much better than my dirty hack. It neatly avoids, the evaluate, the whitespace, the debugging&#8230;.  noice!</p>
<pre><code>
&lt;cfparam name="url.method"&gt;

&lt;!--- This function is placed in the "variables" scope. ---&gt;
&lt;cffunction name="hello" output="false"&gt;
      &lt;cfreturn "hollow ddorld"&gt;
&lt;/cffunction&gt;

&lt;cfset result = ""&gt;
&lt;cfif structKeyExists(variables,url.method)&gt;
      &lt;cfinvoke method="#url.method#" returnvariable="result"&gt;
&lt;/cfif&gt;

 &lt;!--- Clear any previously generated output and output the result. ---&gt;
&lt;cfsetting showdebugoutput="false"&gt;
&lt;cfcontent reset="true"&gt;&lt;cfoutput&gt;#result#&lt;/cfoutput&gt;&lt;cfabort&gt;
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: dreddy</title>
		<link>http://johnmee.com/2008/06/ajax-coldfusion-7/comment-page-1/#comment-252</link>
		<dc:creator>dreddy</dc:creator>
		<pubDate>Wed, 25 Jun 2008 16:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnmee.com/?p=52#comment-252</guid>
		<description>Use cfoutput instead of cfreturn in your cffunction.
CF foresight is now CF8, and CF9 that is under developpement by adobe, and bluedragon and railo which are alternative solution.</description>
		<content:encoded><![CDATA[<p>Use cfoutput instead of cfreturn in your cffunction.<br />
CF foresight is now CF8, and CF9 that is under developpement by adobe, and bluedragon and railo which are alternative solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://johnmee.com/2008/06/ajax-coldfusion-7/comment-page-1/#comment-251</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 25 Jun 2008 13:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnmee.com/?p=52#comment-251</guid>
		<description>I&#039;ll try that again, this time with escaped tags..

&lt;cfparam name=&quot;url.method&quot;&gt;
&lt;cftry&gt;
	&lt;cfinvoke method=&quot;#url.method#&quot; returnvariable=&quot;foo&quot;&gt;&lt;/cfinvoke&gt;
	&lt;cfcontent reset=&quot;true&quot;&gt;

	&lt;cfoutput&gt;#foo#&lt;/cfoutput&gt;
	&lt;cfcatch&gt;&lt;/cfcatch&gt;
&lt;/cftry&gt;

&lt;cffunction name=&quot;hello&quot;&gt;
	&lt;cfreturn &quot;hollow ddorld&quot;&gt;

&lt;/cffunction&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ll try that again, this time with escaped tags..</p>
<p>&lt;cfparam name=&quot;url.method&quot;&gt;<br />
&lt;cftry&gt;<br />
	&lt;cfinvoke method=&quot;#url.method#&quot; returnvariable=&quot;foo&quot;&gt;&lt;/cfinvoke&gt;<br />
	&lt;cfcontent reset=&quot;true&quot;&gt;</p>
<p>	&lt;cfoutput&gt;#foo#&lt;/cfoutput&gt;<br />
	&lt;cfcatch&gt;&lt;/cfcatch&gt;<br />
&lt;/cftry&gt;</p>
<p>&lt;cffunction name=&quot;hello&quot;&gt;<br />
	&lt;cfreturn &quot;hollow ddorld&quot;&gt;</p>
<p>&lt;/cffunction&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://johnmee.com/2008/06/ajax-coldfusion-7/comment-page-1/#comment-250</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 25 Jun 2008 13:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnmee.com/?p=52#comment-250</guid>
		<description>Hey John, 

No need to hate CF, bad work man and all that ;)   

First off, i agree the wddx wrapper is a pain, although back in the day i used to write loads of stuff utilizing wddx, but there are many ways around it.  A cfm file like you suggest is one, but lets find a better way than evaluate() \shudder\

how about this..


	
	
	#foo#
	



	


personally i&#039;d prefer to expose my model by creating a remote proxy that wraps my model methods, and if you specify returntype=&quot;xml&quot; on your remote methods cf won&#039;t wrap them in a wddx packet

Now, if you were on CF8 (i know not everyone is..) you could use the returnFormat=json argument and hey presto</description>
		<content:encoded><![CDATA[<p>Hey John, </p>
<p>No need to hate CF, bad work man and all that <img src='http://johnmee.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />    </p>
<p>First off, i agree the wddx wrapper is a pain, although back in the day i used to write loads of stuff utilizing wddx, but there are many ways around it.  A cfm file like you suggest is one, but lets find a better way than evaluate() \shudder\</p>
<p>how about this..</p>
<p>	#foo#</p>
<p>personally i&#8217;d prefer to expose my model by creating a remote proxy that wraps my model methods, and if you specify returntype=&#8221;xml&#8221; on your remote methods cf won&#8217;t wrap them in a wddx packet</p>
<p>Now, if you were on CF8 (i know not everyone is..) you could use the returnFormat=json argument and hey presto</p>
]]></content:encoded>
	</item>
</channel>
</rss>

