<?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 call to coldfusion component using jQuery</title>
	<atom:link href="http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/</link>
	<description></description>
	<lastBuildDate>Wed, 15 Jun 2011 15:46:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: giorgos</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-3206</link>
		<dc:creator>giorgos</dc:creator>
		<pubDate>Mon, 06 Dec 2010 08:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-3206</guid>
		<description>Hi Rob,

If your cf component works as expected then check this to your jquery code,
The datatype expected should be xml and not json format. Try to change this to see how is it going.

dataType: &quot;json&quot; --&gt;  dataType: &quot;xml&quot;

Cheers, Giorgos</description>
		<content:encoded><![CDATA[<p>Hi Rob,</p>
<p>If your cf component works as expected then check this to your jquery code,<br />
The datatype expected should be xml and not json format. Try to change this to see how is it going.</p>
<p>dataType: &#8220;json&#8221; &#8211;>  dataType: &#8220;xml&#8221;</p>
<p>Cheers, Giorgos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-3163</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Sat, 04 Dec 2010 21:34:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-3163</guid>
		<description>It didn&#039;t post everything...Here is the rest



// &lt;!--
$(document).ready(function(){

	$(&quot;#CountriesList&quot;).change(function()	{
		if($(this).val() != &#039;&#039;){
			$.ajax({
				type: &quot;POST&quot;,
				url: &quot;http://localhost:8500/theadstreet/adStreetLayouts/adStreetLookup.cfc?method=getStates&quot;,
				data: ({ state_country_ID_FK: $(this).val() }),
				dataType: &quot;json&quot;,
				success: function(json){
					$(&#039;#SelectedState option&#039;).remove();
					$(json).find(&#039;record&#039;).each(function() {
						$(&quot;#SelectedState&quot;).append(&#039;&#039; + $(this).find(&#039;state_name&#039;).text() + &#039;&#039;);
					});
				}
			});
		}
	});
});

// --&gt;








Select Country:

...
#CountriesList.Country_name#

Select State:
...

</description>
		<content:encoded><![CDATA[<p>It didn&#8217;t post everything&#8230;Here is the rest</p>
<p>// &lt;!&#8211;<br />
$(document).ready(function(){</p>
<p>	$(&quot;#CountriesList&quot;).change(function()	{<br />
		if($(this).val() != &#039;&#039;){<br />
			$.ajax({<br />
				type: &quot;POST&quot;,<br />
				url: &quot;http://localhost:8500/theadstreet/adStreetLayouts/adStreetLookup.cfc?method=getStates&quot;,<br />
				data: ({ state_country_ID_FK: $(this).val() }),<br />
				dataType: &quot;json&quot;,<br />
				success: function(json){<br />
					$(&#039;#SelectedState option&#039;).remove();<br />
					$(json).find(&#039;record&#039;).each(function() {<br />
						$(&quot;#SelectedState&quot;).append(&#039;&#8217; + $(this).find(&#8217;state_name&#8217;).text() + &#8221;);<br />
					});<br />
				}<br />
			});<br />
		}<br />
	});<br />
});</p>
<p>// &#8211;&gt;</p>
<p>Select Country:</p>
<p>&#8230;<br />
#CountriesList.Country_name#</p>
<p>Select State:<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-3162</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Sat, 04 Dec 2010 21:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-3162</guid>
		<description>I have been trying to get this to work and am having some problems with the XML.  I am am getting a result back but it appears to be a wddxpacket and either I do not know how to read the packet or Jquey doesn&#039;t think it is valid XML.  Any help would be appreciated.

Here is what I have:

CFC
&lt;!--- get States--&gt;

	
    
    
  &lt;!--- Get states from DB --&gt;
  	
    	Select state_ID_PK, state_name 
        From statesTbl
         
        	Where state_country_ID_FK = #arguments.state_country_ID_FK#
        
        Order by state_name
    
  &lt;!--- Return result --&gt;
  


CFM



// &lt;!--
$(document).ready(function(){

	$(&quot;#CountriesList&quot;).change(function()	{
		if($(this).val() != &#039;&#039;){
			$.ajax({
				type: &quot;POST&quot;,
				url: &quot;http://localhost:8500/theadstreet/adStreetLayouts/adStreetLookup.cfc?method=getStates&quot;,
				data: ({ state_country_ID_FK: $(this).val() }),
				dataType: &quot;json&quot;,
				success: function(json){
					$(&#039;#SelectedState option&#039;).remove();
					$(json).find(&#039;record&#039;).each(function() {
						$(&quot;#SelectedState&quot;).append(&#039;&#039; + $(this).find(&#039;state_name&#039;).text() + &#039;&#039;);
					});
				}
			});
		}
	});
});

// --&gt;








Select Country:

...
#CountriesList.Country_name#

Select State:
...

</description>
		<content:encoded><![CDATA[<p>I have been trying to get this to work and am having some problems with the XML.  I am am getting a result back but it appears to be a wddxpacket and either I do not know how to read the packet or Jquey doesn&#8217;t think it is valid XML.  Any help would be appreciated.</p>
<p>Here is what I have:</p>
<p>CFC<br />
<!--- get States--></p>
<p>  <!--- Get states from DB --></p>
<p>    	Select state_ID_PK, state_name<br />
        From statesTbl</p>
<p>        	Where state_country_ID_FK = #arguments.state_country_ID_FK#</p>
<p>        Order by state_name</p>
<p>  <!--- Return result --></p>
<p>CFM</p>
<p>// &lt;!&#8211;<br />
$(document).ready(function(){</p>
<p>	$(&quot;#CountriesList&quot;).change(function()	{<br />
		if($(this).val() != &#039;&#039;){<br />
			$.ajax({<br />
				type: &quot;POST&quot;,<br />
				url: &quot;http://localhost:8500/theadstreet/adStreetLayouts/adStreetLookup.cfc?method=getStates&quot;,<br />
				data: ({ state_country_ID_FK: $(this).val() }),<br />
				dataType: &quot;json&quot;,<br />
				success: function(json){<br />
					$(&#039;#SelectedState option&#039;).remove();<br />
					$(json).find(&#039;record&#039;).each(function() {<br />
						$(&quot;#SelectedState&quot;).append(&#039;&#8217; + $(this).find(&#8217;state_name&#8217;).text() + &#8221;);<br />
					});<br />
				}<br />
			});<br />
		}<br />
	});<br />
});</p>
<p>// &#8211;&gt;</p>
<p>Select Country:</p>
<p>&#8230;<br />
#CountriesList.Country_name#</p>
<p>Select State:<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giorgos</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-1881</link>
		<dc:creator>giorgos</dc:creator>
		<pubDate>Mon, 23 Aug 2010 07:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-1881</guid>
		<description>Hi Sam, 

Of course you can do that if you like to..

cheers,
Giorgos</description>
		<content:encoded><![CDATA[<p>Hi Sam, </p>
<p>Of course you can do that if you like to..</p>
<p>cheers,<br />
Giorgos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-1819</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Wed, 18 Aug 2010 20:54:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-1819</guid>
		<description>Hey,
 
          Good post! I was banging my head to a brick wall trying to do something on these lines.....Very interesting way of putting things together.

I have a suggestion though,
I see the query name inside CFC not being declared in a var scope which is just a regular practice for me to put on.......

Not a biggie :)

Thanks,
Sam.</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>          Good post! I was banging my head to a brick wall trying to do something on these lines&#8230;..Very interesting way of putting things together.</p>
<p>I have a suggestion though,<br />
I see the query name inside CFC not being declared in a var scope which is just a regular practice for me to put on&#8230;&#8230;.</p>
<p>Not a biggie :)</p>
<p>Thanks,<br />
Sam.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giorgos</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-1396</link>
		<dc:creator>giorgos</dc:creator>
		<pubDate>Fri, 28 May 2010 07:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-1396</guid>
		<description>Hi Ben,

There is no onLoad or something, the first select box is filled in with countries data from your database query while the second select box is empty. 

Then the $(&quot;#CountriesList&quot;).change function does the trick, once the countries select box value changed the jQuery ajax method call the cfc component which will deliver us cities depending on selected country id.

Sorry I have no files online as this code comes from a project which is still under development.</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>There is no onLoad or something, the first select box is filled in with countries data from your database query while the second select box is empty. </p>
<p>Then the $(&#8220;#CountriesList&#8221;).change function does the trick, once the countries select box value changed the jQuery ajax method call the cfc component which will deliver us cities depending on selected country id.</p>
<p>Sorry I have no files online as this code comes from a project which is still under development.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://blog.nitorsys.com/ajax-call-to-coldfusion-component-using-jquery/#comment-1391</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 27 May 2010 20:33:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nitorsys.com/?p=242#comment-1391</guid>
		<description>I find this is very interesting and easy to understand, but, I can&#039;t make it work in my project. My project is similar, I&#039;m using counties as primary select and cities as secondary select. Do you have a link to a complete set of files? That would help. It looks as though the secondary select should be empty when it first loads, should there be an onLoad somewhere in the form?

Am a ColdFusion programmer and have used just a little jQuery.</description>
		<content:encoded><![CDATA[<p>I find this is very interesting and easy to understand, but, I can&#8217;t make it work in my project. My project is similar, I&#8217;m using counties as primary select and cities as secondary select. Do you have a link to a complete set of files? That would help. It looks as though the secondary select should be empty when it first loads, should there be an onLoad somewhere in the form?</p>
<p>Am a ColdFusion programmer and have used just a little jQuery.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

