<?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>Gregg Hilferding &#187; Javascript</title>
	<atom:link href="http://www.whoisgregg.com/blog/category/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.whoisgregg.com/blog</link>
	<description>Web Development, Apple Stuff, and More</description>
	<lastBuildDate>Thu, 29 Apr 2010 23:19:52 +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>Prototype 1.5.1 Out! Scriptaculous 1.7.0 *Not* Compatible. :(</title>
		<link>http://www.whoisgregg.com/blog/2007/05/prototype-151-out-scriptaculous-170-not-compatible.html</link>
		<comments>http://www.whoisgregg.com/blog/2007/05/prototype-151-out-scriptaculous-170-not-compatible.html#comments</comments>
		<pubDate>Wed, 02 May 2007 20:20:50 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Signal]]></category>
		<category><![CDATA[Webmaster]]></category>

		<guid isPermaLink="false">http://whoisgregg.com/blog/2007/05/prototype-151-out-scriptaculous-170-not-compatible.html</guid>
		<description><![CDATA[Congratulations to the Prototype team for rolling out Prototype v1.5.1! :D

Sadly, the current stable version of Scriptaculous (v.1.7.0) is not compatible. In Safari, calling any Effect will fill the Javascript console with an infinite number of "Maximum call stack size exceeded." warnings.

You'll need to run the Scriptaculous v1.7.1 beta 2 to avoid this issue until [...]]]></description>
			<content:encoded><![CDATA[<p>Congratulations to the Prototype team for <a href="http://www.prototypejs.org/2007/5/1/prototype-1-5-1-released">rolling out Prototype v1.5.1</a>! :D</p>

<p>Sadly, the current stable version of <a href="">Scriptaculous</a> (v.1.7.0) is <strong>not</strong> compatible. In Safari, calling any Effect will fill the Javascript console with an infinite number of "Maximum call stack size exceeded." warnings.</p>

<p>You'll need to run the <a href="http://mir.aculo.us/2007/4/28/script-aculo-us-1-7-1-beta-2-for-your-download-pleasure">Scriptaculous v1.7.1 beta 2</a> to avoid this issue until a new stable version comes out.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/2007/05/prototype-151-out-scriptaculous-170-not-compatible.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototype Internet Explorer Gotchas</title>
		<link>http://www.whoisgregg.com/blog/2007/04/prototype-internet-explorer-gotchas.html</link>
		<comments>http://www.whoisgregg.com/blog/2007/04/prototype-internet-explorer-gotchas.html#comments</comments>
		<pubDate>Sun, 15 Apr 2007 18:10:22 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Signal]]></category>

		<guid isPermaLink="false">http://whoisgregg.com/blog/2007/04/prototype-internet-explorer-gotchas.html</guid>
		<description><![CDATA[One week into building a technology preview for a new web application, I finally decided to check and "just make sure" that everything was working as well in Windows Internet Explorer as it was working in Safari and Firefox. Imagine my chagrin when the page loaded and was completely blank.

Not even a joyous error message [...]]]></description>
			<content:encoded><![CDATA[<p>One week into building a technology preview for a new web application, I finally decided to check and "just make sure" that everything was working as well in Windows Internet Explorer as it was working in Safari and Firefox. Imagine my chagrin when the page loaded and was <strong>completely blank</strong>.</p>

<p>Not even a joyous error message or self-destruct error report to pore over for clues. Just a blank screen. Nothing. Nada. </p>

<p>First some background... I'm building the client side of the in Javascript using the amazing <a href="http://www.prototypejs.org/">Prototype</a> and <a href="http://script.aculo.us/">Scriptaculous</a> libraries.</p>

<p>It turns out that there are two <strong>very</strong> important things to keep in mind for Internet Explorer. First, <code>Element.extend</code> is your friend when adding to the DOM. Example:</p>

<p><code>var my_div = document.createElement('div');<br />
Element.extend(my_div); // without this line, the next line causes IE to stop processing the script!<br />
my_div.addClassName('thumbnail');
</code></p>

<p>Second, be careful what you use as names for custom attributes! If you inadvertently <a href="http://en.wikipedia.org/wiki/Proton_Pack#Crossing_the_Streams">cross the streams</a> by using form attributes on non-form elements then Internet Explorer will suffer total protonic reversal (or, in other words, forcibly shut down). Example:</p>

<p><code>var my_li = document.createElement('li');<br />
Element.extend(my_li);<br />
my_li.setAttribute('value', s.id); // IE self-destructs<br />
my_li.setAttribute('valuetest', s.id); // IE works fine
</code></p>

<p>Although there is little else I can share about the application I am working on, suffice it to say in about, oh, six months I should have both good news to share and a fantastic grasp on Javascript programming. :)</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/2007/04/prototype-internet-explorer-gotchas.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Convert Unix Timestamp to Javascript Date Object</title>
		<link>http://www.whoisgregg.com/blog/2007/02/convert-unix-timestamp-to-javascript-date-object.html</link>
		<comments>http://www.whoisgregg.com/blog/2007/02/convert-unix-timestamp-to-javascript-date-object.html#comments</comments>
		<pubDate>Mon, 19 Feb 2007 19:55:13 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://whoisgregg.com/blog/2007/02/convert-unix-timestamp-to-javascript-date-object.html</guid>
		<description><![CDATA[Passing a timestamp to javascript? Use this to convert it to a Javascript date object:

var timeStamp = 10000;
var theDate = new Date(timeStamp * 1000);
var dateString = theDate.toGMTString();

Copyright &#169; 2010 Gregg Hilferding. This feed is for personal non-commercial use only.]]></description>
			<content:encoded><![CDATA[<p>Passing a timestamp to javascript? Use this to convert it to a Javascript date object:</p>

<p><code>var timeStamp = 10000;
var theDate = new Date(timeStamp * 1000);
var dateString = theDate.toGMTString();
</code></p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/2007/02/convert-unix-timestamp-to-javascript-date-object.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>del.icio.us Isn&#8217;t It?</title>
		<link>http://www.whoisgregg.com/blog/2006/10/delicious-isnt-it.html</link>
		<comments>http://www.whoisgregg.com/blog/2006/10/delicious-isnt-it.html#comments</comments>
		<pubDate>Sat, 14 Oct 2006 19:46:48 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Administrative]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://whoisgregg.com/blog/2006/10/delicious-isnt-it.html</guid>
		<description><![CDATA[Because I chose toyed with the idea of using the very chic Japanese Cherry Blossom template, I was introduced to the del.icio.us bookmarking site yet again. The difference between this time and the last dozen or so times I've run across it? This time I signed up and converted.

The idea of moving my bookmarks online [...]]]></description>
			<content:encoded><![CDATA[<p>Because I <del>chose</del> <em>toyed with the idea of using</em> the very chic <a href="http://krisandapril.us/2006/06/11/japanese-cherry-blossom/">Japanese Cherry Blossom</a> template, I was introduced to the <a href="http://del.icio.us/">del.icio.us bookmarking site</a> yet again. The difference between this time and the last dozen or so times I've run across it? This time I signed up and converted.</p>

<p>The idea of moving my bookmarks online has been nagging at me for almost a year so it's good that I had an excuse. :)</p>

<h3>Bad News</h3>

<p>The bookmarklet provided during the sign up process (v3) and the one I downloaded from the help section (v4) both failed to work in Safari. Each threw a syntax error.</p>

<p><a href="https://secure.del.icio.us/register?step2">Bad Bookmarklet v3</a>:</p>

<blockquote class="code javascript">javascript:location.href='http://del.icio.us/post?v=3&#038;url='+
encodeURIComponent(location.href)+
'&#038;title='+encodeURIComponent(document.title.replace(/^\s*|i\s*g,''))</blockquote>

<p>See the problem? The regular expression in the title.replace bit is missing the closing "/" plus it has the critical flaw that it removes all the spaces from the entire title, Not just the ones at the beginning and the end.</p>

<p><a href="http://del.icio.us/help/buttons">Bad Bookmarklet v4</a>:</p>

<blockquote class="code javascript">javascript:location.href='http://del.icio.us/post?v=4;url='+
encodeURIComponent(location.href)+';title='+
encodeURIComponent(document.title.replace(/^\s*|\s*g,''))</blockquote>

<p>Same problem here, the only difference between versions is that this passes the variables via javascript instead of in the URL. Probably to deal with extraordinarily long URLs and titles breaking the maximum character length of the URI field.</p>

<p>Corrected Code (Just for fun, I'll call it v5): </p>

<blockquote class="code javascript">javascript:location.href='http://del.icio.us/post?v=5;url='+
encodeURIComponent(location.href)+';title='+
encodeURIComponent(document.title.replace(/^\s*|\s*$/g,''))</blockquote>

<p>Here we go! We've added our closing "/" and dropped in the dollar sign into the second condition to mean "only remove extra spaces from the end of the title."</p>

<h3>Oh right, the link</h3>

<p><a href="http://del.icio.us/whoisgregg">Gregg's Bookmarks</a></p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/2006/10/delicious-isnt-it.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
