<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>( kh )</title>
	<atom:link href="http://hirakawa.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hirakawa.wordpress.com</link>
	<description>Ideas worth sharing</description>
	<lastBuildDate>Tue, 21 Jul 2009 01:30:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hirakawa.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>( kh )</title>
		<link>http://hirakawa.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hirakawa.wordpress.com/osd.xml" title="( kh )" />
	<atom:link rel='hub' href='http://hirakawa.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Ruby on Rails: RJS Error Object Error in IE6</title>
		<link>http://hirakawa.wordpress.com/2009/07/21/ruby-on-rails-rjs-error-object-error-in-ie6/</link>
		<comments>http://hirakawa.wordpress.com/2009/07/21/ruby-on-rails-rjs-error-object-error-in-ie6/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 01:25:34 +0000</pubDate>
		<dc:creator>khirakawa</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[$()]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Object Error]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[removeClassName]]></category>
		<category><![CDATA[RJS Error]]></category>

		<guid isPermaLink="false">http://hirakawa.wordpress.com/?p=32</guid>
		<description><![CDATA[Are you getting an RJS error in IE6, that reads &#8220;[ Object Error ]&#8220;, followed by escaped javascript? That&#8217;s what I was getting last night while I was creating some simple navigation tabs. It was frustrating because it worked in Firefox and Safari, but not IE6. And the error message? Object Error? What does that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hirakawa.wordpress.com&amp;blog=8563906&amp;post=32&amp;subd=hirakawa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Are you getting an RJS error in IE6, that reads &#8220;[ Object Error ]&#8220;, followed by escaped javascript?</p>
<p>That&#8217;s what I was getting last night while I was creating some simple navigation tabs.  It was frustrating because it worked in Firefox and Safari, but not IE6.  And the error message? Object Error? What does<em> that</em> tell me?  Nothing!</p>
<p>So I narrowed down my javascript code to this line:</p>
<p></p>
<pre>var tab_1 = document.getElementById("first_tab");</pre>
<pre>tab_1.removeClassName("active");</pre>
<p></p>
<p>This was throwing the error.  But why?</p>
<p>Well, it turns out in order to use the Prototype method <em>removeClassName()</em>, the element (in this case, tab_1) must have Prototype DOM extensions.</p>
<p>So how do you get elements with Prototype DOM extensions?  Use the dollar method my friend.</p>
<p>Instead of getting the element from <em>getElementById()</em> and then calling <em>removeClassName()</em>, simply do:</p>
<p></p>
<pre>$("first_tab").removeClassName("active")</pre>
<p></p>
<p>And voila, it works in Firefox, Safari, <em>and</em> IE6.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hirakawa.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hirakawa.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hirakawa.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hirakawa.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hirakawa.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hirakawa.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hirakawa.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hirakawa.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hirakawa.wordpress.com&amp;blog=8563906&amp;post=32&amp;subd=hirakawa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hirakawa.wordpress.com/2009/07/21/ruby-on-rails-rjs-error-object-error-in-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36424bcf928506d82631d9d291bfd8e8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">khirakawa</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on Rails: assert_select_rjs :remove failure</title>
		<link>http://hirakawa.wordpress.com/2009/07/15/ruby-on-rails-assert_select_rjs-remove-failure/</link>
		<comments>http://hirakawa.wordpress.com/2009/07/15/ruby-on-rails-assert_select_rjs-remove-failure/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 02:46:11 +0000</pubDate>
		<dc:creator>khirakawa</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tests]]></category>
		<category><![CDATA[:remove]]></category>
		<category><![CDATA[assert_select_rjs]]></category>
		<category><![CDATA[functional test]]></category>

		<guid isPermaLink="false">http://hirakawa.wordpress.com/?p=4</guid>
		<description><![CDATA[Being a newbie rails developer, there are a number of rails caveats that I wish I knew beforehand, such as this one: Suppose I have a div with id = &#8220;test&#8221; and I have a controller function that removes the div using page[:test].remove Now suppose I have a functional test as such: assert_select_rjs :remove, "test" [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hirakawa.wordpress.com&amp;blog=8563906&amp;post=4&amp;subd=hirakawa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Being a newbie rails developer, there are a number of rails caveats that I wish I knew beforehand, such as this one:</p>
<p>Suppose I have a div with id = &#8220;test&#8221; and I have a controller function that removes the div using</p>
<p>
<pre>page[:test].remove</pre>
<p></p>
<p>Now suppose I have a functional test as such:</p>
<p>
<pre>assert_select_rjs :remove, "test"</pre>
<p></p>
<p>Well, it happens to be so that this test fails, even though all my other assert_select_rjs assertions succeed.  Only when the first argument is :remove does the test fail.</p>
<p>Now I don&#8217;t know why this is (anybody want to enlighten me?), but I&#8217;ve found a workaround.  </p>
<p>Instead of the the code above, do:</p>
<p>
<pre>assert_equal @response.body, '$("test").remove();'</pre>
<p></p>
<p>The assert_select_rjs function supposedly does a similar thing under the hood where it does a regex comparison on the response body.</p>
<p>And there you have it.  Test success!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hirakawa.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hirakawa.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hirakawa.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hirakawa.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hirakawa.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hirakawa.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hirakawa.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hirakawa.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hirakawa.wordpress.com&amp;blog=8563906&amp;post=4&amp;subd=hirakawa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hirakawa.wordpress.com/2009/07/15/ruby-on-rails-assert_select_rjs-remove-failure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36424bcf928506d82631d9d291bfd8e8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">khirakawa</media:title>
		</media:content>
	</item>
	</channel>
</rss>
