<?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>Jason Rowe &#187; YUI</title>
	<atom:link href="http://jasonrowe.com/tag/yui/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonrowe.com</link>
	<description></description>
	<lastBuildDate>Tue, 07 Sep 2010 04:53:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>yui number sorting issue</title>
		<link>http://jasonrowe.com/2008/01/17/yui-number-sorting-issue/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=yui-number-sorting-issue</link>
		<comments>http://jasonrowe.com/2008/01/17/yui-number-sorting-issue/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 07:05:31 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://rowejason.com/2008/01/17/yui-number-sorting-issue/</guid>
		<description><![CDATA[So if you are using the YUI DataTable with XHR and numbers you might have noticed the sort is not working correctly. Below is a quick explination and a work around. &#8220;DataTable currently sorts strings, numbers, and dates, but only &#8230; <a href="http://jasonrowe.com/2008/01/17/yui-number-sorting-issue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So if you are using the YUI DataTable with XHR and numbers you might have noticed the sort is not working correctly. Below is a quick explination and a work around.</p>
<blockquote><p>&#8220;DataTable currently sorts strings, numbers, and dates, but <em>only when the values are already those types in JavaScript</em>. In contrast, if you get values over the wire (<abbr title="XMLHttpRequest">XHR</abbr>), DataTable will treat all values as strings in those cases. As a workaround, you could implement a custom sort function to do the data type conversion. Data parsed from markup will be typed correctly, and so we’re a part of the way there; before we get out of beta we plan to provide a mechanism so a value can be treated as a specific type regardless of its origin. I can tell you that in the next release (coming soon) we’ll have a hook for you to do your own conversion of data coming over <abbr title="XMLHttpRequest">XHR</abbr>, and in the subsequent release it will do a lot of conversions for you out of the box and also provide a mechanism for you to do more sophisticated custom conversions.&#8221;</p></blockquote>
<p>Here is the custom sort function I created to fix the issue. It still doesn&#8217;t work well if you have multipage result lists because the string has to go through the function before it becomes an integer. It works well for small lists or where all the results appear right away.</p>
<p>In the snippet below<strong>, &#8220;u&#8221;</strong> would be the variable you  want to get sorting correctly in the data grid results. If you are not familiar with using custom sort functions take a look at the yui data grid docs. It&#8217;s very easy.</p>
<pre>
<pre class="brush: javascript; ">

var myFormatStringFix = 

function(elCell, oRecord, oColumn, oData) 

{ 

oRecord._oData.u = parseInt(oRecord._oData.u); 

elCell.innerHTML = oRecord._oData.u; 

} 
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2008/01/17/yui-number-sorting-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Carousel Control CD Collection</title>
		<link>http://jasonrowe.com/2007/07/18/carousel-control-cd-collection/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=carousel-control-cd-collection</link>
		<comments>http://jasonrowe.com/2007/07/18/carousel-control-cd-collection/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 05:29:00 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://rowejason.com/?p=96</guid>
		<description><![CDATA[I wanted to find an easy way to display a CD collection using javascript instead of flash. While looking around I found a YUI extension called carousel. Here is my small static example of a CD collection. Bill Scott actually &#8230; <a href="http://jasonrowe.com/2007/07/18/carousel-control-cd-collection/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://rowejason.com/search"><img style="float: left; margin: 0px 10px 10px 0px; cursor: hand" src="http://www.rowejason.com/uploaded_images/carousel_example-779114.JPG" border="0" alt="snapshot of carousel" /></a> I wanted to find an easy way to display a CD collection using javascript instead of flash. While looking around I found a YUI extension called carousel. Here is my small static example of a CD collection.</p>
<p>Bill Scott actually doesn&#8217;t support this anymore and the YUI team has taken this on. The new version is very clean and I did try it out. I converted my carousel to the new YUI version but later decided to go with a JQuery extention called jCarousel. They both worked but I think I am going to move in the Jquery direction for awhile.<br />
<a href="http://jasonrowe.com/search"> http://jasonrowe.com/search</a></p>
<p>References:<br />
<a href="http://billwscott.com/carousel/">http://billwscott.com/carousel/</a></p>
<p><a href="http://sorgalla.com/projects/jcarousel/">http://sorgalla.com/projects/jcarousel/</a></p>
<p><a href="http://developer.yahoo.com/yui/carousel/">http://developer.yahoo.com/yui/carousel/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2007/07/18/carousel-control-cd-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
