<?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>36Flavours.com &#187; JavaScript</title>
	<atom:link href="http://36flavours.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://36flavours.com</link>
	<description>A taste of something different...</description>
	<lastBuildDate>Mon, 19 Apr 2010 20:01:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery document ready bug in Safari / WebKit</title>
		<link>http://36flavours.com/2010/01/jquery-document-ready-bug-in-safari-webkit/</link>
		<comments>http://36flavours.com/2010/01/jquery-document-ready-bug-in-safari-webkit/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:52:28 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[1.3.2]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[ready]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://36flavours.com/?p=623</guid>
		<description><![CDATA[There is an issue with the jQuery 1.3.2 document ready function in WebKit based browsers that which can cause numerous problems if you are manipulating the DOM, in my situation getting the width / height of an element. Using the .width() and .height() methods were working fine in every other browser but Safari, which I [...]]]></description>
			<content:encoded><![CDATA[<p class="first">There is an issue with the jQuery 1.3.2 document ready function in WebKit based browsers that which can cause numerous problems if you are manipulating the DOM, in my situation getting the width / height of an element.</p>
<p>Using the <strong>.width()</strong> and <strong>.height()</strong> methods were working fine in every other browser but <strong>Safari</strong>, which I thought was a little bit odd. After trying to come up with an alternative method of coding calculating the heights and comparing them in <strong>FireBug</strong> and <strong>Web Inspector</strong>, I set about Googling the problem.<span id="more-623"></span></p>
<p>The only problem was that I had no idea what to search for, so started with the term &#8220;jquery height in safari&#8221;. The <a href="http://old.nabble.com/Safari-unable-to-get-width-and-height-of-image.-td17511293s27240.html" target="_blank">first result</a> looked promising but took a fair bit of reading, although it proved to be worth while in the end. One comment pointed out that you should try to:</p>
<blockquote><p><strong>use jQuery(window).load() instead of jQuery(document).ready()</strong></p></blockquote>
<p>I tried this and straight away saw the results that were expected. The problem was that I didn&#8217;t really want to stop using the preferred document ready method <em>($(function() { &#8230; });)</em>, so searched the <a href="http://dev.jquery.com/" target="_blank">jQuery Bug Tracker</a> for any sign of a bug report.</p>
<p>I eventually found one highlighting the exact problem I was having, issue <a href="http://dev.jquery.com/ticket/5521" target="_blank">#5521</a>. The solution came in the form of a patch the document ready function that targets Safari.</p>
<p><code>+ if (jQuery.browser.safari &amp;&amp; document.readyState != "complete") {<br />
+ setTimeout( arguments.callee, 100 );<br />
+ return;<br />
+ }</code></p>
<p>It doesn&#8217;t look like this fix (nor any other form of solution) have been included in the latest nightly build, so I&#8217;m opting for the window load solution for now.</p>
<p><strong>EDIT:</strong> Another solution to this problem is  to simply include any CSS files before the inclusion of the jQuery file. I found this by browsing the bug tracker and coming across<a href="http://dev.jquery.com/ticket/3690" target="_blank"> ticket #3690</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2010/01/jquery-document-ready-bug-in-safari-webkit/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Today I wrote my first JavaScript tutorial</title>
		<link>http://36flavours.com/2009/09/today-i-wrote-my-first-javascript-tutorial/</link>
		<comments>http://36flavours.com/2009/09/today-i-wrote-my-first-javascript-tutorial/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 08:50:15 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[first]]></category>
		<category><![CDATA[fubra]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[sixcrayons]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://36flavours.com/?p=370</guid>
		<description><![CDATA[Today saw the launch of SixCrayons.com, a new design blog focussing on six main categories of front end web development, from design to additional enhancements using scripting languages such as Flash and JavaScript. Although I have a hand in the majority of categories, JavaScript is something I have a keen interest in and was asked [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Today saw the launch of <a href="http://sixcrayons.com/" target="_blank">SixCrayons.com</a>, a new design blog focussing on six main categories of front end web development, from design to additional enhancements using scripting languages such as Flash and JavaScript.</p>
<p>Although I have a hand in the majority of categories, JavaScript is something I have a keen interest in and was asked to write a short tutorial on a JS related subject.<span id="more-370"></span></p>
<p><img class="aligncenter size-full wp-image-373" title="SixCrayons.com" src="http://36flavours.com/wp-content/uploads/2009/09/sixcrayons.png" alt="SixCrayons.com" width="600" height="430" /></p>
<p>It took me a while to think of something to base the blog post on, but it eventually coincided well with something I needed for another project I am currently working on.</p>
<p>We&#8217;ve all seen the use of pre-filled input areas, where a faded description or hint of what should be entered by the user is inserted into the input and disappears when it is clicked on.</p>
<p>I am a big <a href="http://jquery.com/" target="_blank">jQuery</a> fan, so writing a plug-in to solve the issue I had seemed like a good solution, so wrote the first draft of my plug-in whilst trying to describe what was happening along the way.</p>
<p>Hopefully what I&#8217;ve written is fairly simple to follow but it is my first attempt at writing a tutorial of this length and detail, so if you have any hints or comments (aka constructive criticism) then do let me know <img src='http://36flavours.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Head over to SixCrayons and have a scan through my tutorial on writing <a href="http://sixcrayons.com/2009/09/10/a-simple-jquery-input-hint-plug-in/" target="_blank">a simple jQuery input hint plug-in</a>, or even just browse through the other categories.</p>
<p style="text-align: center;"><a href="http://sixcrayons.com/2009/09/10/a-simple-jquery-input-hint-plug-in/" target="_blank"><img class="aligncenter size-full wp-image-372" title="Simple jQuery input hint plug-iin" src="http://36flavours.com/wp-content/uploads/2009/09/sixcrayons_inputhint.png" alt="Simple jQuery input hint plug-iin" width="596" height="251" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/09/today-i-wrote-my-first-javascript-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps API default control look-and-feel</title>
		<link>http://36flavours.com/2009/03/google-maps-api-default-control-look-and-feel/</link>
		<comments>http://36flavours.com/2009/03/google-maps-api-default-control-look-and-feel/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 11:52:00 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[maps]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=197</guid>
		<description><![CDATA[Although I haven&#8217;t managed to do any work with the Google Maps API for a few months now, I do try and frequent the Google Geo Developers Blog every once in a while. On my last visit I noticed a post mentioning new functionality that allows you to include the standard user interface elements you [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Although I haven&#8217;t managed to do any work with the Google Maps API for a few months now, I do try and frequent the <a href="http://googlegeodevelopers.blogspot.com/" target="_blank">Google Geo Developers Blog</a> every once in a while.</p>
<p>On my last visit I noticed a post mentioning new functionality that allows you to include the standard user interface elements you get on the main Google Maps site, plus the standard behaviour of keyboard and mouse handling.</p>
<p style="text-align: center;"><span id="more-197"></span><img class="aligncenter" title="Google Maps default UI" src="http://36flavours.com/blog/wp-content/uploads/2009/03/gmaps_default_ui.jpg" alt="Google Maps default UI" width="380" height="263" /></p>
<p>To include the new UI and behaviours, include the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// var map = new GMap2(mapDiv);</span>
map.<span style="color: #660066;">setUIToDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This function will ensure that any updates to the <a href="http://maps.google.com" target="_blank">maps.google.com</a> UI will also be reflected on your site without you having to carry out any updates.</p>
<p>Read the <a href="http://googlegeodevelopers.blogspot.com/2009/02/posted-by-jez-fletcher-maps-api-team.html" target="_blank">full blog post here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/03/google-maps-api-default-control-look-and-feel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JS preload image &#039;bug&#039; in Opera</title>
		<link>http://36flavours.com/2009/03/js-preload-image-bug-in-opera/</link>
		<comments>http://36flavours.com/2009/03/js-preload-image-bug-in-opera/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 14:48:39 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[preload]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=181</guid>
		<description><![CDATA[I have recently attempted to load an image in JavaScript (using jQuery) and once loaded get it&#8217;s dimensions. Using the following code I managed to successfully read the width and height properties in FireFox 2/3, IE 6/7, Windows Safari 3/4 and Google Chrome, but the dimensions were not available in Opera (10). $&#40;'&#60;img alt=&#34;&#34; /&#62;'&#41; [...]]]></description>
			<content:encoded><![CDATA[<p class="first">I have recently attempted to load an image in JavaScript (using <a href="http://jquery.com/">jQuery</a>) and once loaded get it&#8217;s dimensions.</p>
<p>Using the following code I managed to successfully read the width and height properties in <a href="http://www.mozilla-europe.org/en/firefox/">FireFox</a> 2/3, <a href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx">IE</a> 6/7, <a href="http://www.apple.com/safari/download/">Windows Safari</a> 3/4 and <a href="http://www.google.co.uk/chrome/">Google Chrome</a>, but the dimensions were not available in <a href="http://www.opera.com/">Opera</a> (10).<span id="more-181"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;img alt=&quot;&quot; /&gt;'</span><span style="color: #009900;">&#41;</span>
	.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">height</span><span style="color: #339933;">;</span>
		<span style="color: #006600; font-style: italic;">//..</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
	.<span style="color: #660066;">error</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">//..</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
	.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'/path/to/image.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After a fair bit of time playing around trying to debug this small snippet of code, I <em>eventually</em> discovered that if the image was appended to the DOM <strong>after</strong> the width and height had been read then Opera would report the values correctly.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">		<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">height</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #006600; font-style: italic;">//..</span></pre></div></div>

<p>Simply moving line 3 down to below the reading of dimensions solved this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/03/js-preload-image-bug-in-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple jQuery string padding function</title>
		<link>http://36flavours.com/2009/02/simple-jquery-string-padding-function/</link>
		<comments>http://36flavours.com/2009/02/simple-jquery-string-padding-function/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 12:27:57 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[str_pad]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=142</guid>
		<description><![CDATA[I&#8217;ve written a very simple jQuery function to return a string padded to a specified length, similar to the php equivalent str_pad. 1 2 3 4 5 6 7 8 $.strPad = function&#40;i,l,s&#41; &#123; var o = i.toString&#40;&#41;; if &#40;!s&#41; &#123; s = '0'; &#125; while &#40;o.length &#60; l&#41; &#123; o = s + o; [...]]]></description>
			<content:encoded><![CDATA[<p class="first">I&#8217;ve written a very simple <a href="http://jquery.com/" target="_blank">jQuery</a> function to return a string padded to a specified length, similar to the php equivalent <a href="http://uk2.php.net/manual/en/function.str-pad.php" target="_blank">str_pad</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">strPad</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>l<span style="color: #339933;">,</span>s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> i.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> s <span style="color: #339933;">=</span> <span style="color: #3366CC;">'0'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>o.<span style="color: #660066;">length</span> <span style="color: #339933;">&lt;</span> l<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		o <span style="color: #339933;">=</span> s <span style="color: #339933;">+</span> o<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> o<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Example Usage:</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">strPad</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">12</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// returns 00012</span>
$.<span style="color: #660066;">strPad</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'abc'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">6</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'#'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// returns ###abc</span></pre></div></div>

<p>This version only supports left padding, which is why it is labelled as only a simple version <img src='http://36flavours.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/02/simple-jquery-string-padding-function/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS Opacity in Opera using jQuery</title>
		<link>http://36flavours.com/2009/02/css-opacity-in-opera-using-jquery/</link>
		<comments>http://36flavours.com/2009/02/css-opacity-in-opera-using-jquery/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 23:05:51 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=134</guid>
		<description><![CDATA[Whilst attempting to cross browser test a jQuery plug-in that I&#8217;m currently working on, I noticed that my opacity settings were being ignored in my current version of Opera (9.23). $&#40;&#34;#id&#34;&#41;.css&#40;&#123;opacity: 0.8&#125;&#41;; It turns out that the latest version of jQuery (1.3.1) doesn&#8217;t believe that Opera 9.2 supports CSS opacity, and therefore it is ignored [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Whilst attempting to cross browser test a <a href="http://jquery.com/">jQuery</a> plug-in that I&#8217;m currently working on, I noticed that my opacity settings were being ignored in my current version of <a href="http://www.opera.com/browser/">Opera</a> (9.23).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#id&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>opacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.8</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It turns out that the latest version of <a href="http://docs.jquery.com/Downloading_jQuery">jQuery (1.3.1)</a> doesn&#8217;t believe that Opera 9.2 supports CSS opacity, and therefore it is ignored completely.<span id="more-134"></span></p>
<p>There are two possible fixes for this, the first is to simply <strong>upgrade Opera</strong> to a newer version (the latest is 9.6.3).</p>
<p>The second option is to tell jQuery that opera does support opacity using the following &#8211; or similar &#8211; within your script:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">opera</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $.<span style="color: #660066;">support</span>.<span style="color: #660066;">opacity</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/02/css-opacity-in-opera-using-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BailOutBrown Flash Game + Google Gadget</title>
		<link>http://36flavours.com/2009/01/bailoutbrown-flash-game-google-gadget/</link>
		<comments>http://36flavours.com/2009/01/bailoutbrown-flash-game-google-gadget/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 13:25:48 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[gordon brown]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=124</guid>
		<description><![CDATA[Following up on the success of sockandawe.com the latest leader bashing game has now arrived with the release of bailoutbrown.com. The format is the same, except instead of throwing shoes you are armed with a wad of cash! So even if you have no interest in the political side of things you can still have [...]]]></description>
			<content:encoded><![CDATA[<p class="first"><img style="float: right; margin: 0 0 10px 10px;" title="BailOutBrown.com" src="http://36flavours.com/blog/wp-content/uploads/2009/01/bailoutbrown.jpg" alt="BailOutBrown.com" width="150" height="147" /></p>
<p>Following up on the success of <a href="http://www.sockandawe.com" target="_blank">sockandawe.com</a> the latest leader bashing game has now arrived with the release of <a href="http://www.bailoutbrown.com" target="_blank">bailoutbrown.com</a>.</p>
<p>The format is the same, except instead of throwing shoes you are armed with a wad of cash! So even if you have no interest in the political side of things you can still have a bit of fun playing the game.<span id="more-124"></span></p>
<p>I&#8217;ve also written a new Google Gadget that displays the amount of cash thrown at Brown, assuming we are throwing wads of £200 at him that is.</p>
<p style="text-align: center;"><script src="http://www.gmodules.com/ig/ifr?url=http://www.bailoutbrown.com/gadget/module.xml&amp;synd=open&amp;w=220&amp;h=50&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script></p>
<p>Include this on your website using the following script:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.gmodules.com/ig/ifr?url=http://www.bailoutbrown.com/gadget/module.xml&amp;amp;synd=open&amp;amp;w=220&amp;amp;h=50&amp;amp;title=&amp;amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;amp;output=js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/01/bailoutbrown-flash-game-google-gadget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SockAndAwe Google Gadget</title>
		<link>http://36flavours.com/2009/01/sockandawe-google-gadget/</link>
		<comments>http://36flavours.com/2009/01/sockandawe-google-gadget/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 12:33:35 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=103</guid>
		<description><![CDATA[After working with the SockAndAwe.com site for a little while now, I have written and submitted my first Google Gadget which displays the number of shoes thrown at George Bush via the internationally popular flash game. To embed this gadget into your site you can use the following code: &#60;script src=&#34;http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/107818028448432089104/sockandawe.xml&#38;amp;synd=open&#38;amp;w=160&#38;amp;h=60&#38;amp;title=&#38;amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&#38;amp;output=js&#34;&#62;&#60;/script&#62; Alternatively you can add [...]]]></description>
			<content:encoded><![CDATA[<p class="first">After working with the <a title="Sock and Awe" href="http://www.sockandawe.com" target="_blank">SockAndAwe.com</a> site for a little while now, I have written and submitted my first Google Gadget which displays the number of shoes thrown at George Bush via the internationally popular flash game.</p>
<p><center><script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/107818028448432089104/sockandawe.xml&amp;synd=open&amp;w=160&amp;h=60&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23ffffff&amp;output=js"></script></center></p>
<p>To embed this gadget into your site you can use the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/107818028448432089104/sockandawe.xml&amp;amp;synd=open&amp;amp;w=160&amp;amp;h=60&amp;amp;title=&amp;amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;amp;output=js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Alternatively you can <a title="Add to iGoogle" href="http://fusion.google.com/ig/add?synd=open&amp;source=ggyp&amp;moduleurl=http://hosting.gmodules.com/ig/gadgets/file/107818028448432089104/sockandawe.xml" target="_blank">add this to your iGoogle</a> homepage or <a title="Customise Google Gadget" href="http://www.gmodules.com/ig/creator?synd=open&amp;hl=en&amp;url=http://hosting.gmodules.com/ig/gadgets/file/107818028448432089104/sockandawe.xml" target="_blank">customise this gadget</a> to fit your site design.</p>
<p>Why not join in shoe throwing fun and see how many times you can hit Bush by playing the game at <a title="Play Sock and Awe now!" href="http://www.sockandawe.com" target="_blank">www.sockandawe.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/01/sockandawe-google-gadget/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Static Maps API</title>
		<link>http://36flavours.com/2008/04/google-static-maps-api/</link>
		<comments>http://36flavours.com/2008/04/google-static-maps-api/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 23:06:04 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=19</guid>
		<description><![CDATA[Admittedly I have completely missed the boat on blogging about the Google Static Maps API which was launched back in February, but I was reminded of them the other day whilst working on a site admin panel. As the maps I wanted to display were only a small addition to the panel providing a quick [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Admittedly I have completely missed the boat on blogging about the <a title="Google Static Maps API Documentation" href="http://code.google.com/apis/maps/documentation/staticmaps/" target="_blank">Google Static Maps API</a> which was launched back in February, but I was reminded of them the other day whilst working on a site admin panel.</p>
<p>As the maps I wanted to display were only a small addition to the panel providing a quick snapshot of a location, using the full <a title="Google Maps API" href="http://code.google.com/apis/maps/" target="_blank">JavaScript API</a> would have been rather unnecessary.</p>
<p>This is where the static maps prove very useful and are an easy and quick addition to any web page, whether or not you use Google&#8217;s <a title="Static Map Wizard" href="http://gmaps-samples.googlecode.com/svn/trunk/simplewizard/makestaticmap.html" target="_blank">static map wizard</a>.<span id="more-19"></span></p>
<p style="text-align: center;"><img class="aligncenter" src="http://maps.google.com/staticmap?center=51.235912,-0.751019&amp;zoom=13&amp;size=600x250&amp;key=ABQIAAAAKZicTwgioOORlE6jmhLsXBSLEcCEqrS14fPXnqPSoKgS_zqOmBQ4lOPHeR_Ny16Tb4dvQyff2an2gw" alt="Google Static Maps API Example" width="600" height="250" /></p>
<p>Static maps are displayed as images and are configured by a number of parameters sent as part of the image source in the http request, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://maps.google.com/staticmap?center=51.235912,
-0.751019&amp;amp;zoom=13&amp;amp;size=460x250&amp;amp;key=API_KEY</pre></div></div>

<p>To use the static maps you are required to sign up for a Google Maps API key which can be obtained from <a title="Sign up for a Google Maps API Key" href="http://code.google.com/apis/maps/signup.html" target="_blank">here</a>, although if you already have a JS API key this can be used.</p>
<p>When it comes to road map views the static maps provide you with many of the features available in the JS version, including but not limited to zoom levels, markers and polyline paths.</p>
<p>One downside I encountered was that static maps does not provide the ability to display satellite or hybrid imagery, or at least as far as I am aware.</p>
<p>There is also a query limit of 1000 unique (different) image requests  per viewer per day, but a quick browse at the <a title="Google Groups - Maps API" href="http://groups.google.com/group/Google-Maps-API" target="_blank">Google Group</a> for the Maps API highlighted a few posts encouraging people to cache their results.</p>
<p>Even if you prefer to stick to the JS version at least now you can display some form of output to any visitors without JavaScript or with JS disabled, although they&#8217;re not as dynamic at least there&#8217;s something for them visually.</p>
<p><strong>UPDATE </strong></p>
<p>Since originally posting this, Google have announced the new static map features on the <a title="Official Google Maps API Blog" href="http://googlemapsapi.blogspot.com/" target="_blank">Google Maps API Blog</a>, bringing to our attention the introduction of the new marker styles, paths, map image formats and the ability to translate labels into a number of languages. Read the <a title="Static Maps Have Never Looked This Good!" href="http://googlemapsapi.blogspot.com/2008/04/static-maps-have-never-looked-this-good.html" target="_blank">full post here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2008/04/google-static-maps-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Professional JavaScript for Web Developers</title>
		<link>http://36flavours.com/2008/04/professional-javascript-for-web-developers/</link>
		<comments>http://36flavours.com/2008/04/professional-javascript-for-web-developers/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 21:01:07 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[fubra]]></category>
		<category><![CDATA[o'reilly]]></category>
		<category><![CDATA[wrox]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=13</guid>
		<description><![CDATA[When starting for Fubra back in 2006 I would have probably described my knowledge of JavaScript as basic to say the least. Knowing how to alert a bit of text and pop up a confirmation box was sadly pretty much the upper range of my ability at that point in time. Since then I have [...]]]></description>
			<content:encoded><![CDATA[<p class="first"><img class="size-full wp-image-14 alignleft" style="margin: 10px 10px 10px 0; float: left;" title="Wrox - Professional Javascript for Web Developers" src="http://36flavours.com/blog/wp-content/uploads/2008/04/wrox-js-for-web-dev.jpg" alt="" width="100" height="128" />When starting for Fubra back in 2006 I would have probably described my knowledge of JavaScript as basic to say the least. Knowing how to alert a bit of text and pop up a confirmation box was sadly pretty much the upper range of my ability at that point in time.</p>
<p>Since then I have found myself purchasing and reading a number of web development related books, whether they be JavaScript, PHP, MySQL or CSS. Each one highlighted something that I either didn&#8217;t know or simplified something I may have known already.</p>
<p>The majority of my collection is made up of books from the <a title="O'Reilly Books" href="http://www.oreilly.com/" target="_blank">O&#8217;Reilly</a> collection, but I also own a number of the <a title="Wrox Publications" href="http://www.wrox.com" target="_blank">Wrox</a> publications. My current favourite &#8211; or should I say most referred to &#8211; is the Wrox edition of <a title="Buy this book at Amazon" href="http://www.amazon.co.uk/Professional-JavaScript-Developers-Wrox-Guides/dp/0764579088/" target="_blank">Professional JavaScript for Web Developers</a> by <a title="The Official Web Site of Nicholas C. Zakas" href="http://www.nczonline.net/" target="_blank">Nicholas C. Zakas</a>.</p>
<p>One of the most useful features it offers are the comparisons between IE and the DOM, highlighting what is and is not available to you across them both. The many examples provided throughout the book cover numerous situations across all the major browsers and provide a deeper understanding of the differences and how to work around them.</p>
<p>Recommending this book to anyone with an intermediate knowledge of JavaScript is something I would do without hesitation. Having recently lent it to a friend of mine, I have however discovered that it may not be so suitable to those just beginning JS or anyone having little development experience.</p>
<p>The synopsis does explain that the book:</p>
<blockquote><p>Quickly covers JavaScript basics and then moves on to more advanced topics such as object-oriented programming, XML, Web services, and remote scripting</p></blockquote>
<p>I am always on the lookout for books of similar nature to this on the subject of JavaScript in order to expand my collection and knowledge, therefore any suggestions or recommendations that you may have are welcomed.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2008/04/professional-javascript-for-web-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
