<?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>Rexxars.com</title>
	<atom:link href="http://rexxars.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rexxars.com</link>
	<description>A developers perspective on PHP, Android, Mootools, Node.JS and other awesomeness.</description>
	<lastBuildDate>Tue, 08 Nov 2011 15:33:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Speeding up SQLite insert operations</title>
		<link>http://rexxars.com/android/speeding-up-sqlite-insert-operations/</link>
		<comments>http://rexxars.com/android/speeding-up-sqlite-insert-operations/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 15:30:53 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=185</guid>
		<description><![CDATA[We&#8217;ve started a blog at work where we will be writing about all kinds of technology we use at VG.no and its network of services. I will try to be a little more active with my blogging from now on and will make sure to post a link to any interesting articles both on this [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve started <a href="http://tech.vg.no/">a blog</a> at work where we will be writing about all kinds of technology we use at <a href="http://www.vg.no/">VG.no</a> and its network of services. I will try to be a little more active with my blogging from now on and will make sure to post a link to any interesting articles both on this blog and on <a href="http://twitter.com/#!/rexxars">twitter</a>.</p>
<p>I wrote up a blog post there about how to <a href="http://tech.vg.no/2011/04/04/speeding-up-sqlite-insert-operations/">speed up SQLite insert operations</a>.<br />
Check it out over at <a href="http://tech.vg.no/2011/04/04/speeding-up-sqlite-insert-operations/">VG Tech</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/android/speeding-up-sqlite-insert-operations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MorseMyIp.com is online</title>
		<link>http://rexxars.com/morse-my-ip/morsemyip-com-is-online/</link>
		<comments>http://rexxars.com/morse-my-ip/morsemyip-com-is-online/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 12:56:23 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Morse my IP]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[morse]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=180</guid>
		<description><![CDATA[Last night I read up on morse code and wanted to use what I learned to do something fun. I decided to create a &#8220;What is my IP-address&#8221; service (I know, there are plenty) and have it give you the IP in morse code as well as in plain text, here&#8217;s the result. It took [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I read up on <a href="http://en.wikipedia.org/wiki/Morse_code">morse code</a> and wanted to use what I learned to do something fun.</p>
<p>I decided to create a &#8220;What is my IP-address&#8221; service (I know, there are plenty) and have it give you the IP in morse code as well as in plain text, <a href="http://morsemyip.com/" target="_blank">here&#8217;s the result</a>. </p>
<p>It took a little longer than I thought it would to create a wav-file through PHP with all the dits and dahs, wav-headers and whatnot &#8211; but I got there in the end.<br />
Didn&#8217;t expect it to be so hard to get it to play on a website either; I am now using three layers:</p>
<ul>
<li>HTML5 audio for browsers that support it</li>
<li>&lt;bgsound&gt; for IE5, 6, 7</li>
<li>Flash, for others</li>
</ul>
<p>Unfortunately, I have not managed to get it to play on my Android phone yet &#8211; I hear Gingerbread has support for HTML5 audio though.</p>
<p>Not at all satisfied with the look of the site, I just threw something together in a hurry &#8211; so it will be prettier at some point. Have a look at <a href="http://morsemyip.com/">http://morsemyip.com/</a> <img src='http://rexxars.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/morse-my-ip/morsemyip-com-is-online/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting the Samsung Galaxy S to work on Linux</title>
		<link>http://rexxars.com/android/samsung-galaxy-s-on-linux/</link>
		<comments>http://rexxars.com/android/samsung-galaxy-s-on-linux/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 14:01:47 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=175</guid>
		<description><![CDATA[I was developing a quick prototype for an Android application today, and was having some trouble getting my Samsung Galaxy S working on Linux. Running &#8220;adb devices&#8221; only revealed it as &#8220;????????&#8221; &#8211; so I was not able to launch my application on the device. The fix was pretty simple, and would be easy to [...]]]></description>
			<content:encoded><![CDATA[<p>I was developing a quick prototype for an Android application today, and was having some trouble getting my Samsung Galaxy S working on Linux. Running &#8220;adb devices&#8221; only revealed it as &#8220;????????&#8221; &#8211; so I was not able to launch my application on the device.</p>
<p>The fix was pretty simple, and would be easy to find if you&#8217;re smart enough to <a href="http://developer.android.com/guide/developing/device.html">poke around the documentation</a> a little &#8211; but I ended up Googling for it, so maybe someone else will do the same. Here&#8217;s how I made it work on Ubuntu 10.10:</p>
<ul>
<li>Create a file <em>/etc/udev/rules.d/51-android.rules</em> as root.</li>
<li>Open up your favourite editor and put the following line in the file:<br />
<code>SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"</code></li>
<li>Make it executable: chmod a+r /etc/udev/rules.d/51-android.rules</li>
</ul>
<p>That&#8217;s all it took. The above should work for all Samsung devices, the Android documentation has a <a href="http://developer.android.com/guide/developing/device.html#VendorIds">reference</a> to other vendor IDs that you might use if you don&#8217;t have a Samsung device.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/android/samsung-galaxy-s-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android application: Agricola Buddy</title>
		<link>http://rexxars.com/android/agricola-buddy/</link>
		<comments>http://rexxars.com/android/agricola-buddy/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 13:37:42 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[agricola]]></category>
		<category><![CDATA[application]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=160</guid>
		<description><![CDATA[Yesterday, I released an Android application on the Android Market; Agricola Buddy. For months now, we&#8217;ve had regular games of the Agricola board game at work. It&#8217;s a real gem of a game, and in my opinion perfect for &#8220;thinkers&#8221; &#8211; like programmers usually are. The application helps you with calculating the score for each [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I released an Android application on the Android Market; <a href="http://agricola-buddy.rexxars.com/">Agricola Buddy</a>.</p>
<p>For months now, we&#8217;ve had regular games of the Agricola board game at work. It&#8217;s a real gem of a game, and in my opinion perfect for &#8220;thinkers&#8221; &#8211; like programmers usually are.</p>
<p><a href="http://rexxars.com/wp-content/uploads/2010/07/chart.png"><img src="http://rexxars.com/wp-content/uploads/2010/07/chart.png" alt="Scan to download" title="QR-code" width="140" height="140" class="alignright size-full wp-image-167" style="border:0;" /></a></p>
<p>The application helps you with calculating the score for each player in the game, which is done at the end of each game. While far from a necessity when playing, it provided me with an opportunity to create and release an application of limited size and complexity.</p>
<p>You can find the application on the Android Market, just search for &#8220;Agricola Buddy&#8221; or scan the QR-code to the right.</p>
<p>In the future, I hope to add lots of cool features to it &#8211; a way to store results over time, submit to a webservice, easily share the results with others, occupation/minor improvement reference and so on. If you have an Android phone, give it a go <img src='http://rexxars.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Here are some screenshots:</p>
<p><a href="http://rexxars.com/wp-content/uploads/2010/07/player.png" style="margin-right: 20px;"><img title="Choose player" src="http://rexxars.com/wp-content/uploads/2010/07/player-200x300.png" alt="" width="200" height="300" /></a><a href="http://rexxars.com/wp-content/uploads/2010/07/scoring.png"><img title="Scoring" src="http://rexxars.com/wp-content/uploads/2010/07/scoring-200x300.png" alt="" width="200" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/android/agricola-buddy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Android emulator skin: Sony Ericsson X10 Mini</title>
		<link>http://rexxars.com/android/emulator-skin-sony-ericsson-x10-mini/</link>
		<comments>http://rexxars.com/android/emulator-skin-sony-ericsson-x10-mini/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 14:39:12 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[sonyericsson]]></category>
		<category><![CDATA[x10mini]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=151</guid>
		<description><![CDATA[Been a while since I made my Samsung Galaxy skin. Since then, a ton of Android phones have arrived and many of them with different resolutions than the &#8220;normal&#8221; HVGA. A popular one in Europe is the X10 Mini, from Sony Ericsson which has a QVGA resolution. When you are creating Android applications, you should [...]]]></description>
			<content:encoded><![CDATA[<p>Been a while since I made my <a href="http://rexxars.com/android/android-emulator-skin-samsung-galaxy/">Samsung Galaxy</a> skin. Since then, a ton of Android phones have arrived and many of them with different resolutions than the &#8220;normal&#8221; HVGA.</p>
<p>A popular one in Europe is the <em>X10 Mini</em>, from Sony Ericsson which has a QVGA resolution.</p>
<p>When you are creating Android applications, you should make sure that it works well on various resolutions, which the emulator helps you with. However, the built in QVGA skin is rather ugly, so I decided to try and whip up a skin based on the X10 Mini. Here&#8217;s what I ended up with:</p>
<p style="text-align: center;"><a href="http://rexxars.com/wp-content/uploads/2010/07/x10miniskin.jpg" target="_blank"><img class="aligncenter size-medium wp-image-152" title="Sony Ericsson X10 Mini Android Skin" src="http://rexxars.com/wp-content/uploads/2010/07/x10miniskin-300x237.jpg" alt="Sony Ericsson X10 Mini Android Skin" width="300" height="237" /></a></p>
<p>I quite like it, and it also works fairly well on low-resolution monitors, such as on netbooks (at least it does on mine). I zipped it up and <a href="http://rexxars.com/files/android/emulator-skins/X10Mini.zip">put it up for download</a>. To use it:</p>
<ol>
<li>Extract the zip file into your <strong>Android/platforms/android-&lt;version&gt;/skins</strong> folder.</li>
<li>Create a new AVD with the AVD Manager and select X10Mini from the skins dropdown.</li>
<li>If you want to get as close to the X10 Mini software, use the 1.6 image (<strong>android-4</strong>, I believe).</li>
<li>Enjoy!</li>
</ol>
<p><strong>Note</strong>: I forgot to include the hardware.ini file required for 1.6+. Should work better now <img src='http://rexxars.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/android/emulator-skin-sony-ericsson-x10-mini/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Calling Javascript from Silverlight</title>
		<link>http://rexxars.com/silverlight/calling-javascript-from-silverlight/</link>
		<comments>http://rexxars.com/silverlight/calling-javascript-from-silverlight/#comments</comments>
		<pubDate>Thu, 06 May 2010 20:49:54 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=120</guid>
		<description><![CDATA[Over the past month or two, I&#8217;ve been learning Silverlight at work, so I might put up a few posts when I encounter interesting topics. The solutions I post might not be the best way of doing things, obviously Integrating Silverlight into a rich, Javascript-driven website, I found myself wanting to call Javascript functions from [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past month or two, I&#8217;ve been learning Silverlight at work, so I might put up a few posts when I encounter interesting topics. The solutions I post might not be the best way of doing things, obviously <img src='http://rexxars.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Integrating Silverlight into a rich, Javascript-driven website, I found myself wanting to call Javascript functions from Silverlight. A quick Google search told me this was possible, using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.scriptobject.invoke%28v=VS.95%29.aspx">HtmlPage.Window.Invoke</a> method. You could also use the Eval method, but it feels like a dirty hack,<br />
so let&#8217;s not go there.</p>
<pre lang="csharp" line="1">
private void displayDialog(string message)
{
	HtmlPage.Window.Invoke("showSomeDialog", message);
}
</pre>
<p>Easy, right? But like a good Javascript-coder, I like to &#8220;namespace&#8221; my methods, instead of leaving lots of global functions around. The invoke method seems to call global objects only, so I can&#8217;t do <strong>Invoke(&#8220;Rexxars.showSomeDialog&#8221;, &#8220;message&#8221;)</strong> &#8211; which is a shame. So I thought to myself, I&#8217;ll just create a &#8220;proxy&#8221; function which calls methods in my namespace. Simple:</p>
<pre lang="javascript" line="1">
function slBridge(method, arg) {
	if(Rexxars[method]) {
		Rexxars[method](arg);
	}
}
</pre>
<p>Now I can do: <strong>HtmlPage.Window.Invoke(&#8220;slBridge&#8221;, &#8220;showSomeDialog&#8221;, message);</strong> &#8211; cool. But what if I want to call a function with more than one argument? I further improved my Silverlight-Javascript &#8220;bridge&#8221; to support a variable number of arguments:</p>
<pre lang="javascript" line="1">
function slBridge() {
	// Turn the arguments object into a regular, usable array
	var args = Array.prototype.slice.call(arguments);
	// Method name is the first argument and should not be included
	var method = args.shift();
	// Make sure the method exists inside our namespace
	if(Rexxars[method]) {
		// Call the method with the arguments passed
		Rexxars[method].apply(null, args);
	}
}
</pre>
<p>Simple, eh? Now I can use the slBridge function to call any method inside my Rexxars namespace, with different number of arguments in each. Sweet! <img src='http://rexxars.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/silverlight/calling-javascript-from-silverlight/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Codename Eagle Nation is back online</title>
		<link>http://rexxars.com/cenation/codename-eagle-nation-back-online/</link>
		<comments>http://rexxars.com/cenation/codename-eagle-nation-back-online/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 20:40:37 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[CE Nation]]></category>
		<category><![CDATA[codename-eagle]]></category>
		<category><![CDATA[gaming]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=100</guid>
		<description><![CDATA[9 years ago, I started a fan site dedicated to the game called Codename Eagle. In 2005, I shut the website down due to a lack of time. A couple of weeks ago, some friends of mine brought up the old game and we had a blast playing again. After searching for some info on [...]]]></description>
			<content:encoded><![CDATA[<p>9 years ago, I started a fan site dedicated to the game called Codename Eagle. In 2005, I shut the website down due to a lack of time. A couple of weeks ago, some friends of mine brought up the old game and we had a blast playing again. After searching for some info on it online, I found there was very little information available on the game, so I decided to quickly throw together a reference site on the game for anyone who was looking for information on it.</p>
<p>It&#8217;s now online at <a href="http://codenameeagle.net/">codenameeagle.net</a> &#8211; I suggest you check out the unofficial multiplayer demo &#8211; it&#8217;s a real blast at any LAN party. Definitely worth a try!</p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/cenation/codename-eagle-nation-back-online/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MooTools IdleTimer</title>
		<link>http://rexxars.com/mootools/idletimer/</link>
		<comments>http://rexxars.com/mootools/idletimer/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 10:30:29 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Mootools]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[forge]]></category>
		<category><![CDATA[idletimer]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=81</guid>
		<description><![CDATA[Have you ever wanted to log a user out of your site if he is inactive for a given amount of time? Create a better user experience by dimming or hiding page elements while the user is watching a video? A couple of months ago I came across Nick Zakas&#8217; YUI approach to this problem, [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to log a user out of your site if he is inactive for a given amount of time?<br />
Create a better user experience by dimming or hiding page elements while the user is watching a video?</p>
<p><img class="alignright" title="Mootools IdleTimer" src="http://rexxars.com/project/idletimer/title.png" alt="" width="185" height="78" /></p>
<p>A couple of months ago I came across Nick Zakas&#8217; <a href="http://www.nczonline.net/blog/2009/06/02/detecting-if-the-user-is-idle-with-javascript-and-yui-3/">YUI approach</a> to this problem, and recently I found Paul Irish&#8217;s <a href="http://paulirish.com/2009/jquery-idletimer-plugin/">jQuery plugin</a> which was based on Nick&#8217;s work.</p>
<p>This is my attempt at creating a Mootools class that uses the same approach. Quite simply, it fires a timer that activates a callback after a given amount of time. The timer is reset if the user moves the mouse, presses a key, scrolls using the scroll wheel or clicks any mouse button. This has to be done over the active document, obviously.</p>
<p>Key features:</p>
<ul>
<li>Can be attached to a single element on the page or the entire document/window.</li>
<li>Lets you set up multiple instances with different timeouts and events.</li>
<li>Easily retrieve the idle status from the instance using the isIdle property.</li>
<li>Find the number of milliseconds since the user was last active.</li>
<li>Allows you to call the active() method to manually reset the idle state &#8211; useful for Flash and other overlays that lets you communicate with Javascript.</li>
<li>Easily retrieve an IdleTimer instance using element.get(&#8216;idle&#8217;, { options });</li>
<li>Free and open source. MIT-licensed.</li>
</ul>
<p>Check out the <a href="http://rexxars.com/project/idletimer/">demo page</a> for more details. The source is available on <a href="http://github.com/rexxars/IdleTimer">Github</a> as well as in the recently opened <a href="http://mootools.net/forge/">MooTools Forge</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/mootools/idletimer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ØnskerSeg.no is now live</title>
		<link>http://rexxars.com/%c3%b8nsker-seg/%c3%b8nskerseg-no-is-now-live/</link>
		<comments>http://rexxars.com/%c3%b8nsker-seg/%c3%b8nskerseg-no-is-now-live/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 22:10:47 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Ønsker Seg]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=73</guid>
		<description><![CDATA[My new project, ØnskerSeg.no is now live. &#8220;Ønsker Seg&#8221; is a service that lets you create and share wishlists with people you know. Each user gets a simple and easy to remember URL, x.onskerseg.no. For now, the service is only available in Norwegian, but if I have enough time it would be fun to make [...]]]></description>
			<content:encoded><![CDATA[<p>My new project, <a href="http://onskerseg.no/">ØnskerSeg.no</a> is now live.</p>
<p>&#8220;Ønsker Seg&#8221; is a service that lets you create and share wishlists with people you know. Each user gets a simple and easy to remember URL, x.onskerseg.no. For now, the service is only available in Norwegian, but if I have enough time it would be fun to make it &#8220;international&#8221;.</p>
<p>It&#8217;s not often I have the time or dedication to finish a project like this, so I&#8217;m very happy to see it online and I&#8217;m going to keep adding features to it. So if you&#8217;re Norwegian and you&#8217;re looking for a simple way to create and share wishlists, <a href="http://onskerseg.no/">take a look</a>!</p>
<div id="attachment_74" class="wp-caption aligncenter" style="width: 310px"><img class="size-full wp-image-74" title="ØnskerSeg.no - the new Norwegian wish list service" src="http://rexxars.com/wp-content/uploads/2009/12/onskerseg.png" alt="My latest project, ØnskerSeg.no" width="300" height="181" /><p class="wp-caption-text">My latest project, ØnskerSeg.no</p></div>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/%c3%b8nsker-seg/%c3%b8nskerseg-no-is-now-live/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Selecting all checkboxes in a group with Mootools, one-liner</title>
		<link>http://rexxars.com/mootools/selecting-all-checkboxes-in-a-group-with-mootools/</link>
		<comments>http://rexxars.com/mootools/selecting-all-checkboxes-in-a-group-with-mootools/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 19:07:16 +0000</pubDate>
		<dc:creator>Rexxars</dc:creator>
				<category><![CDATA[Mootools]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://rexxars.com/?p=57</guid>
		<description><![CDATA[How many times have you had to do one of these things? A group of items, each with a checkbox. You want a button/checkbox to select all the checkboxes within that group. I ran across this again today, and making the javascript to do the work I was once again reminded why I love Mootools [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left;">
<div id="attachment_58" class="wp-caption alignleft" style="width: 264px"><img class="size-full wp-image-58 " title="checkboxes" src="http://rexxars.com/wp-content/uploads/2009/08/checkboxes.jpg" alt="Fairly common..?" width="254" height="275" /><p class="wp-caption-text">Fairly common..?</p></div>
</div>
<p>How many times have you had to do one of these things? A group of items, each with a checkbox. You want a button/checkbox to select all the checkboxes within that group.</p>
<p>I ran across this again today, and making the javascript to do the work I was once again reminded why I love Mootools so much:</p>
<p>With just three lines of code (1 line to do the actual checking/unchecking), I had this up and running. It couldn&#8217;t have taken longer than 30 seconds to write. I love quick snippets <img src='http://rexxars.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Obviously, this wouldn&#8217;t be hard to do in jQuery or any other JS framework, but I love how elegant and intuitive Mootools does it. I shudder when I think of how many times I&#8217;ve done things similar to this in plain old Javascript.</p>
<p>Anyway, there&#8217;s a <a href="http://rexxars.com/snippets/checkbox-magic/">demo page</a> available, and here&#8217;s the code I ended up with, for anyone interested:<br />
<br style="clear: left;" /></p>
<pre lang="javascript" line="1">
$$('li.head input[type=checkbox]').addEvent('click', function() {
	this.getParent('ul').getElements('input[type=checkbox]').setProperty('checked', this.checked);
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rexxars.com/mootools/selecting-all-checkboxes-in-a-group-with-mootools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

