<?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: CF 8 Ajax with CFSELECT BIND</title>
	<atom:link href="http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=coldfusion-8-cfselect-bind-ajax</link>
	<description>Development answers from real life experiences.</description>
	<lastBuildDate>Tue, 10 Jan 2012 13:05:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Ross</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comment-7</link>
		<dc:creator>Ross</dc:creator>
		<pubDate>Fri, 08 Oct 2010 20:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://10.0.0.11/?p=3#comment-7</guid>
		<description>You don&#039;t need to remove the entire onRequestStart method.  I initially ran into problems with Ben&#039;s example because my onRequestStart and End methods were including my header and footer HTML.    Changing my code to this allowed the bind to work:


	  
</description>
		<content:encoded><![CDATA[<p>You don&#8217;t need to remove the entire onRequestStart method.  I initially ran into problems with Ben&#8217;s example because my onRequestStart and End methods were including my header and footer HTML.    Changing my code to this allowed the bind to work:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comment-5</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 28 Mar 2009 18:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://10.0.0.11/?p=3#comment-5</guid>
		<description>You can deal with this dynamically at runtime, and still keep onRequest for cfm pages:
[coldfusion]
&lt;cffunction name=&quot;onRequestStart&quot;&gt;
	&lt;cfargument name=&quot;targetpage&quot;&gt;
	&lt;!--- Remove the onRequest method for remote cfc calls, otherwise we&#039;ll get a blank response ---&gt;
	&lt;cfif listlast(arguments.targetpage, &quot;.&quot;) is &quot;cfc&quot;&gt;
		&lt;cfset StructDelete(this, &quot;onRequest&quot;) /&gt;
		&lt;cfset StructDelete(variables,&quot;onRequest&quot;)/&gt;
	&lt;/cfif&gt;	
&lt;/cfargument&gt;&lt;/cffunction&gt;
[/coldfusion] </description>
		<content:encoded><![CDATA[<p>You can deal with this dynamically at runtime, and still keep onRequest for cfm pages:<br />
[coldfusion]<br />
&lt;cffunction name=&quot;onRequestStart&quot;&gt;<br />
	&lt;cfargument name=&quot;targetpage&quot;&gt;<br />
	&lt;!&#8212; Remove the onRequest method for remote cfc calls, otherwise we&#8217;ll get a blank response &#8212;&gt;<br />
	&lt;cfif listlast(arguments.targetpage, &quot;.&quot;) is &quot;cfc&quot;&gt;<br />
		&lt;cfset StructDelete(this, &quot;onRequest&quot;) /&gt;<br />
		&lt;cfset StructDelete(variables,&quot;onRequest&quot;)/&gt;<br />
	&lt;/cfif&gt;<br />
&lt;/cfargument&gt;&lt;/cffunction&gt;<br />
[/coldfusion]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John C. Bland II</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comment-4</link>
		<dc:creator>John C. Bland II</dc:creator>
		<pubDate>Sat, 28 Mar 2009 18:53:24 +0000</pubDate>
		<guid isPermaLink="false">http://10.0.0.11/?p=3#comment-4</guid>
		<description>Matt, as you pointed to Ben&#039;s quote, the onRequest method is problematic for web services, Flash Remoting, etc. The problem is you are trying to call &quot;whatever.cfc&quot; and onRequest is attempting to serve the file to the browser vs allow a direct call to a method int he cfc.

To get around it use onRequestStart or do a check to see if the requested filename is your remote cfc.
[coldfusion]
&lt;code&gt;
&lt;cffunction name=&quot;onRequestStart&quot;&gt;
	&lt;cfargument name=&quot;targetpage&quot;&gt;
	&lt;!-- Remove the onRequest method for remote cfc calls, otherwise we&#039;ll get a blank response --&gt;
	&lt;cfif listlast(arguments.targetpage, &quot;.&quot;) is &quot;cfc&quot;&gt;
		&lt;cfset StructDelete(this, &quot;onRequest&quot;) /&gt;
		&lt;cfset StructDelete(variables,&quot;onRequest&quot;)/&gt;
	&lt;/cfif&gt;	
&lt;/cfargument&gt;&lt;/cffunction&gt;&lt;/code&gt;[/coldfusion]
</description>
		<content:encoded><![CDATA[<p>Matt, as you pointed to Ben&#8217;s quote, the onRequest method is problematic for web services, Flash Remoting, etc. The problem is you are trying to call &#8220;whatever.cfc&#8221; and onRequest is attempting to serve the file to the browser vs allow a direct call to a method int he cfc.</p>
<p>To get around it use onRequestStart or do a check to see if the requested filename is your remote cfc.<br />
[coldfusion]<br />
<code><br />
<cffunction name="onRequestStart"><br />
	<cfargument name="targetpage"><br />
	<!-- Remove the onRequest method for remote cfc calls, otherwise we'll get a blank response --><br />
	<cfif listlast(arguments.targetpage, ".") is "cfc"><br />
		<cfset StructDelete(this, "onRequest") /><br />
		<cfset StructDelete(variables,"onRequest")/><br />
	</cfif><br />
</cfargument></cffunction></code>[/coldfusion]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gowri</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comment-6</link>
		<dc:creator>gowri</dc:creator>
		<pubDate>Wed, 28 Jan 2009 18:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://10.0.0.11/?p=3#comment-6</guid>
		<description>i want to select one select option then it efect will show on to the another select option box</description>
		<content:encoded><![CDATA[<p>i want to select one select option then it efect will show on to the another select option box</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scratty</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comment-3</link>
		<dc:creator>Scratty</dc:creator>
		<pubDate>Sun, 17 Feb 2008 18:49:33 +0000</pubDate>
		<guid isPermaLink="false">http://10.0.0.11/?p=3#comment-3</guid>
		<description>Sid,

I agree with you on calling the CFC directly.  The URL method seems more like a hack to me, but ....

On the onRequest(), Ben Forta&#039;s reply was:

&quot;The onRequest() issues sounds sounds like the same limitation with Web Services and more, and is documented as a restriction.&quot;

Make sense but a bit limiting.</description>
		<content:encoded><![CDATA[<p>Sid,</p>
<p>I agree with you on calling the CFC directly.  The URL method seems more like a hack to me, but &#8230;.</p>
<p>On the onRequest(), Ben Forta&#8217;s reply was:</p>
<p>&#8220;The onRequest() issues sounds sounds like the same limitation with Web Services and more, and is documented as a restriction.&#8221;</p>
<p>Make sense but a bit limiting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sid Maestre</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comment-2</link>
		<dc:creator>Sid Maestre</dc:creator>
		<pubDate>Sun, 17 Feb 2008 18:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://10.0.0.11/?p=3#comment-2</guid>
		<description>Thanks for the post on binding to a cfselect. Have you found out why the OnRequest function in the application.cfc file interferes with cfselect data binding? I was having the same problem and your solution worked for me. 

I found a work around using bind=&quot;url:ajax.cfm?action=getStuff()&quot; as a substitute for bind=&quot;cfc:cfc.foo.getStuff()&quot; 

I prefer calling the cfc directly for security reasons.</description>
		<content:encoded><![CDATA[<p>Thanks for the post on binding to a cfselect. Have you found out why the OnRequest function in the application.cfc file interferes with cfselect data binding? I was having the same problem and your solution worked for me. </p>
<p>I found a work around using bind=&#8221;url:ajax.cfm?action=getStuff()&#8221; as a substitute for bind=&#8221;cfc:cfc.foo.getStuff()&#8221; </p>
<p>I prefer calling the cfc directly for security reasons.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

