<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scratty's Blog &#187; ColdFusion</title>
	<atom:link href="http://www.scratty.com/tag/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scratty.com</link>
	<description>Development answers from real life experiences.</description>
	<lastBuildDate>Thu, 29 Apr 2010 15:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CF 8 Ajax with CFSELECT BIND</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 18:06:04 +0000</pubDate>
		<dc:creator>Scratty</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://10.0.0.11/?p=3</guid>
		<description><![CDATA[As mentioned in Ben Forta's blog you can use the BIND attribute on a CFSELECT tag to populate the data from a CFC using AJAX.  The problem I had was that even using Ben's samples I could not get the data to populate.  After alot of tinkering I finally got it to work by remove the onRequest() method from Application.cfc.  Why this affects this functionality is a mystery to me.  Really for the application I'm working on it's not a big problem but on other projects it could be.

My second part of the problem is that I have a cfc directory that is OUTSIDE of the application's root directory.  For example:]]></description>
			<content:encoded><![CDATA[<p></p><p>I love the new AJAX functionality in ColdFusion 8, but I am running into problems using it.</p>
<p>As mentioned in <a title="Ben Forta's Blog" href="http://www.forta.com/blog/index.cfm/2007/7/17/Last-Minute-ColdFusion-Ajax-Enhancements" target="_blank">Ben Forta&#8217;s blog</a> you can use the BIND= attribute on a CFSELECT tag to populate the data from a CFC using AJAX.</p>
<p>The problem I had was that even using Ben&#8217;s samples I could not get the data to populate.  After alot of tinkering I finally got it to work by remove the onRequest() method from Application.cfc.  Why this affects this functionality is a mystery to me.  Really for the application I&#8217;m working on it&#8217;s not a big problem but on other projects it could be.</p>
<p>My second part of the problem is that I have a cfc directory that is OUTSIDE of the application&#8217;s root directory.  For example:</p>
<p>/website_root<br />
/components<br />
/images</p>
<p>Then I map /cacfc to /components and reference my cfc&#8217;s by prepending cacfc to the component IE. cacfc.database.data.   This works great as I can share components among applications easily enough.  But when I call the cfc with the bind attribute of the CFSELECT, ColdFusion looks for the cfc in the root directory.   Here&#8217;s an example:<br />
<code><br />
</code></p>
<p>The AJAX debugger looks for the cfc /school.cfc which obviously doesn&#8217;t exist.   If I move the cfc to a directory under the web root (ie /cfc) it works.</p>
<p>Either I am doing something terribly wrong or these are 2 bugs in CF8.</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;title=CF+8+Ajax+with+CFSELECT+BIND" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;title=CF+8+Ajax+with+CFSELECT+BIND" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;title=CF+8+Ajax+with+CFSELECT+BIND&amp;desc=As%20mentioned%20in%20Ben%20Forta%27s%20blog%20you%20can%20use%20the%20BIND%20attribute%20on%20a%20CFSELECT%20tag%20to%20populate%20the%20data%20from%20a%20CFC%20using%20AJAX.%20%20The%20problem%20I%20had%20was%20that%20even%20using%20Ben%27s%20samples%20I%20could%20not%20get%20the%20data%20to%20populate.%20%20After%20alot%20of%20tinkering%20I%20finally%20got%20it%20to%20work%20by%20remove%20the%20onRequest%28%29%20method%20from%20Application.cfc.%20%20Why%20this%20affects%20this%20functionality%20is%20a%20mystery%20to%20me.%20%20Really%20for%20the%20application%20I%27m%20working%20on%20it%27s%20not%20a%20big%20problem%20but%20on%20other%20projects%20it%20could%20be.%0D%0A%0D%0AMy%20second%20part%20of%20the%20problem%20is%20that%20I%20have%20a%20cfc%20directory%20that%20is%20OUTSIDE%20of%20the%20application%27s%20root%20directory.%20%20For%20example%3A" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;bm_description=CF+8+Ajax+with+CFSELECT+BIND&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;title=CF+8+Ajax+with+CFSELECT+BIND" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;title=CF+8+Ajax+with+CFSELECT+BIND" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/&amp;title=CF+8+Ajax+with+CFSELECT+BIND" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=CF+8+Ajax+with+CFSELECT+BIND+-+http://b2l.me/e74sh&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
