<?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>BarelyBlogging &#187; forms</title>
	<atom:link href="http://www.barelyfitz.com/blog/archives/category/forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barelyfitz.com/blog</link>
	<description>Patrick Fitzgerald of BarelyFitz Designs</description>
	<lastBuildDate>Thu, 13 Oct 2011 01:55:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bookmarklet: sort all drop-down select lists on a page</title>
		<link>http://www.barelyfitz.com/blog/archives/2006/04/04/301/</link>
		<comments>http://www.barelyfitz.com/blog/archives/2006/04/04/301/#comments</comments>
		<pubDate>Tue, 04 Apr 2006 21:11:06 +0000</pubDate>
		<dc:creator>pat</dc:creator>
				<category><![CDATA[DHTML]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[forms]]></category>

		<guid isPermaLink="false">http://www.barelyfitz.com/blog/archives/2006/04/04/301/</guid>
		<description><![CDATA[Some of my co-workers got stuck using a poorly-designed web application that has huge drop-down select lists. Unfortunately the people who designed this web app didn&#8217;t forsee the need to actually present the list items in any particular order, so its nearly impossible to find anything.
I made the following bookmarklet to sort all the select [...]]]></description>
			<content:encoded><![CDATA[<p>Some of my co-workers got stuck using a poorly-designed web application that has huge drop-down select lists. Unfortunately the people who designed this web app didn&#8217;t forsee the need to actually present the list items in any particular order, so its nearly impossible to find anything.</p>
<p>I made the following bookmarklet to sort all the select lists on the page. It&#8217;s probably not much use to anyone else, but at least I got to learn how to make a bookmarklet. Unfortunately it has to work in IE, which has a strict limit on the size of bookmarklets, so I had to keep it very simple.</p>
<dl>
<dt> <a href="javascript:(function(){function sortSelect(e){var oA,i,o;oA=[];for(i=0;i<e.options.length;i++){o=e.options[i];oA[i]=new Option(o.text,o.value,o.defaultSelected,o.selected);}oA.sort(function(a,b){var la=a.text.toLowerCase(),lb=b.text.toLowerCase();if(la>lb){return 1;}if(la<lb ){return-1;}return 0;});e.options.length=0;for(i=0;i<oA.length;i++){e.options[i]=oA[i];oA[i]=null;}return true;}var eA=document.getElementsByTagName('select');for(var i=0;i<eA.length;i++){sortSelect(eA[i]);}})()">SortSelect bookmarklet</lb></a></dt>
<dd>Bookmark this link then click it on a page that has one or more select elements. The select lists will be sorted alphabetically. Tested in Firefox and IE6.<br />
<form method="get"> Test:<br />
<select id="testselect" name="testselect">   <option value="z">z</option>    <option value="zb">z</option>   <option>   </option><option>   </option><option value="y">y</option>   <option value="x">x</option>   <option value="a">A</option>   <option value="c">C</option>    <option value="b">b</option> </select>
</p></form>
</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://www.barelyfitz.com/blog/archives/2006/04/04/301/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

