<?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>Web Development By George &#187; Ajax</title>
	<atom:link href="http://www.webdevelopmentbygeorge.com/tag/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevelopmentbygeorge.com</link>
	<description>ColdFusion, Flex, and JavaScript Programming</description>
	<lastBuildDate>Mon, 14 Nov 2011 20:45:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>script.aculo.us Ajax Sortable Lists adjustment for ColdFusion</title>
		<link>http://www.webdevelopmentbygeorge.com/2010/04/16/script-aculo-us-ajax-sortable-lists-adjustment-for-coldfusion/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=script-aculo-us-ajax-sortable-lists-adjustment-for-coldfusion</link>
		<comments>http://www.webdevelopmentbygeorge.com/2010/04/16/script-aculo-us-ajax-sortable-lists-adjustment-for-coldfusion/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:57:07 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[script.aculo.us]]></category>

		<guid isPermaLink="false">http://www.webdevelopmentbygeorge.com/?p=199</guid>
		<description><![CDATA[So normally I&#8217;m a YUI guy. I enjoy their widgets and some of the other features available, and I&#8217;m comfortable with it. I work with several sites here that my co-workers work on, and they often prefer different JS Libraries. So I try to minimize the libraries on a site. Nothing more difficult, I feel, [...]]]></description>
			<content:encoded><![CDATA[<p>So normally I&#8217;m a YUI guy.  I enjoy their widgets and some of the other features available, and I&#8217;m comfortable with it.  I work with several sites here that my co-workers work on, and they often prefer different JS Libraries.  So I try to minimize the libraries on a site.  Nothing more difficult, I feel, when you&#8217;re maintaining a website and have to maintain YUI, jQuery, Dojo, and Script.aculo.us/Prototype all at the same time and with all of those libraries loading for a client!</p>
<p>So I had to repair something that wasn&#8217;t working in IE8 (imagine that <img src='http://www.webdevelopmentbygeorge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) that was written quite some time ago.  The site had script.aculo.us/prototype on it so I wanted to stick with that library.  Thankfully, I came across this post:  <a href="http://zenofshen.com/posts/ajax-sortable-lists-tutorial">http://zenofshen.com/posts/ajax-sortable-lists-tutorial</a> and it&#8217;s a pretty handy layout for PHP and Script.aculo.us.  The problem arises at the bottom of the post.  In PHP, you would be fine using this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">parse_str</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'data'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>ColdFusion won&#8217;t parse out the string of <em>list_to_sort[]=2&#038;list_to_sort[]=1&#038;list_to_sort[]=3</em> like that though.  So I recommend making this adjustment to what&#8217;s coming through:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> newList <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">ListChangeDelims</span><span style="color: #0000FF;">&#40;</span>url.<span style="color: #0000FF;">data</span>, <span style="color: #009900;">&quot;|&quot;</span>, <span style="color: #009900;">&quot;list_to_sort[]=,&amp;list_to_sort[]=&quot;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> sortPos <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">listLen</span><span style="color: #0000FF;">&#40;</span>newList, <span style="color: #009900;">&quot;|&quot;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">list</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#newList#&quot;</span> delimiters<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;|&quot;</span> <span style="color: #0000FF;">index</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;thisID&quot;</span><span style="color: #0000FF;">&gt;</span></span>
       <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;insertSort&quot;</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#request.source#&quot;</span><span style="color: #0000FF;">&gt;</span></span>
               INSERT INTO 'table' (listID, sortOrder)
                     VALUES (<span style="color: #0000FF;">#thisID#</span>, <span style="color: #0000FF;">#sortPos#</span>)
        <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
        <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> sortPos <span style="color: #0000FF;">=</span> sortPos - <span style="color: #FF0000;">1</span> <span style="color: #0000FF;">/&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.webdevelopmentbygeorge.com/2010/04/16/script-aculo-us-ajax-sortable-lists-adjustment-for-coldfusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CFGoogle &#8211; Now that&#8217;s neat</title>
		<link>http://www.webdevelopmentbygeorge.com/2009/07/20/cfgoogle-now-thats-neat/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cfgoogle-now-thats-neat</link>
		<comments>http://www.webdevelopmentbygeorge.com/2009/07/20/cfgoogle-now-thats-neat/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 12:52:40 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.webdevelopmentbygeorge.com/?p=95</guid>
		<description><![CDATA[So I stumbled across this on my twitter feed while reading what Ray Camden had put up about the rework of the riaforge.org backend to incorporate the CFGoogle api interface written by Todd Sharp. It looks really need and could provide a great deal of use to us ColdFusion junkies out there. I say check [...]]]></description>
			<content:encoded><![CDATA[<p>So I stumbled across this on my twitter feed while reading what Ray Camden had put up about the rework of the riaforge.org backend to incorporate the CFGoogle api interface written by Todd Sharp.  It looks really need and could provide a great deal of use to us ColdFusion junkies out there.  I say check it out!</p>
<p>CFSilence:<br />
<a href="http://cfsilence.com/blog/client/index.cfm/2009/7/15/CFGoogle--A-ColdFusion-Package-For-Interacting-With-Several-Google-APIs">CFGoogle</a></p>
<p>RiaForge:<br />
<a href="http://cfgoogle.riaforge.org/">http://cfgoogle.riaforge.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdevelopmentbygeorge.com/2009/07/20/cfgoogle-now-thats-neat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

