<?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>wonkablog &#187; Programming</title>
	<atom:link href="http://wonkabar.org/category/computers/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://wonkabar.org</link>
	<description>linux, databases, cartoons and cornflakes</description>
	<lastBuildDate>Thu, 26 Aug 2010 15:44:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>prototype form serializer gotcha</title>
		<link>http://wonkabar.org/2010/03/29/prototype-form-serializer-gotcha/</link>
		<comments>http://wonkabar.org/2010/03/29/prototype-form-serializer-gotcha/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:38:59 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wonkabar.org/?p=1195</guid>
		<description><![CDATA[In learning JavaScript / AJAX, I've been using the Prototype library, and I've been really happy with it.  It's quickly gotten me able to wrap my head around what the possibilities are, as well as providing some good docs with great examples.
I hit a snag with the Form.serialize function today that took me a while [...]]]></description>
			<content:encoded><![CDATA[<p>In learning JavaScript / AJAX, I've been using the <a href="http://prototypejs.org/">Prototype</a> library, and I've been really happy with it.  It's quickly gotten me able to wrap my head around what the possibilities are, as well as providing some good docs with great examples.</p>
<p>I hit a snag with the <a href="http://prototypejs.org/api/form/serialize">Form.serialize</a> function today that took me a while to figure out what was going on.  Blame it on a confusing doc, because this certainly could have been explained with more clarity.</p>
<p>The Prototype doc (the old one, <a href="http://api.prototypejs.org/dom/form.html#serialize-class_method">the new one</a> is hard to navigate and has less information) says that if you pass true to the getHash parameter, it will return "an object hash."  A careful reading of that should be implied, because it returns a <em>JavaScript hash</em>, not a <em>Prototype Hash</em> object.  Big difference.</p>
<p>I hit upon the problem because I would serialize my form, then try to add more keys to it, using the <a href="http://prototypejs.org/api/hash/set">set</a> function.  That would throw errors, and I couldn't figure out why.</p>
<p>So, there's a couple of ways around it.  The simplest one I like is to immediately create it as a <a href="http://prototypejs.org/api/hash">Prototype Hash</a>, so you can do what you would normally do.</p>
<p>var h = $H($('form').serialize(true));</p>
]]></content:encoded>
			<wfw:commentRss>http://wonkabar.org/2010/03/29/prototype-form-serializer-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>learning javascript</title>
		<link>http://wonkabar.org/2010/02/24/learning-javascript/</link>
		<comments>http://wonkabar.org/2010/02/24/learning-javascript/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 20:58:30 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wonkabar.org/?p=1170</guid>
		<description><![CDATA[At work, I'm starting on a new Intranet site for the company, and one thing I am really wanting to do is ramp up my JavaScript skills in the process so I can make a large part of it AJAX driven.  I've played with it a bit in the past, and with the awesome Prototype [...]]]></description>
			<content:encoded><![CDATA[<p>At work, I'm starting on a new Intranet site for the company, and one thing I am really wanting to do is ramp up my JavaScript skills in the process so I can make a large part of it AJAX driven.  I've played with it a bit in the past, and with the awesome <a href="http://www.prototypejs.org/">Prototype</a> class as well, but up until now it hasn't been anything more glamorous than hiding and displaying pockets of information.</p>
<p>I've been doing some reading up the past few days, and stumbled upon some great resources.  One really cool thing I found, that I'll write about later since I've got some ebuilds in the works, is <a href="http://live.gnome.org/Seed">GNOME Seed</a>.  Seed is, basically, JavaScript bindings for <a href="http://www.gtk.org/">GTK+</a>.  In other words, you can <a href="http://people.gnome.org/~racarr/seed/tutorial-standalone/tutorial.html">build GUI applications in JavaScript</a>.  How freaking cool is that?  (For the curious, read <a href="http://arstechnica.com/open-source/news/2009/01/javascript-gtk-bindings.ars">this</a>, <a href="http://library.gnome.org/devel/seed/stable/">this</a> and <a href="http://alsaf1.wordpress.com/">this</a>.)</p>
<p>Anyway, one part of doing my research about JavaScript is building a little toolkit of common functions that I can use as a fallback when I need to understand what's going on.  I'm really familiar with PHP, so I've been using that as  a sort of inspiration.</p>
<p>I've got a little function I wrote, called var_dump(), which basically does the same thing as <a href="http://us.php.net/var_dump">the PHP function</a>, and with similar syntax output.  The code is <a href="http://spaceparanoids.org/code/javascript/common.js">here</a>.  If any JavaScript gurus wants to look at it and give me some pointers, let me know.  I'd appreciate it. <img src='http://wonkabar.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Mine is making a call to Seed, but obviously it'd be easy enough to put into a browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://wonkabar.org/2010/02/24/learning-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
