<?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>OliverBrown.me.uk &#187; Javascript</title>
	<atom:link href="http://www.oliverbrown.me.uk/category/technology/computers/programming/web-programming/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oliverbrown.me.uk</link>
	<description></description>
	<lastBuildDate>Sun, 21 Aug 2011 09:08:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>QED Wiki and the Zend Framework</title>
		<link>http://www.oliverbrown.me.uk/2006/10/05/qed-wiki-and-the-zend-framework/</link>
		<comments>http://www.oliverbrown.me.uk/2006/10/05/qed-wiki-and-the-zend-framework/#comments</comments>
		<pubDate>Thu, 05 Oct 2006 18:46:55 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[PHP6]]></category>
		<category><![CDATA[RAD]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[wikis]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/10/05/qed-wiki-and-the-zend-framework/</guid>
		<description><![CDATA[IBM are working on an impressive looking product called QED Wiki, developed with the Zend Framework. Fundamentally it&#8217;s a wiki like any other. But there is a cool layer on top of it that could be revolutionary (although like many Web 2.0 concepts will probably fall short and just be &#8220;cool&#8221; &#8211; we can hope). [...]]]></description>
			<content:encoded><![CDATA[<p>IBM are working on an impressive looking product called <a href="http://devzone.zend.com/node/view/id/678">QED Wiki</a>, developed with the <a href="http://framework.zend.com/">Zend Framework</a>.</p>
<p>Fundamentally it&#8217;s a wiki like any other. But there is a cool layer on top of it that could be revolutionary (although like many Web 2.0 concepts will probably fall short and just be &#8220;cool&#8221; &#8211; we can hope). The interface allows you to create &#8220;situational applications&#8221; that can link different components together with the ease of a wiki.</p>
<p>It doesn&#8217;t really make much sense just reading about it so go watch <a href="http://files.zend.com/qedwiki">the video</a> about it.</p>
<p>On a related note, you can now get snapshots of <a href="http://snaps.php.net/">PHP 6</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/10/05/qed-wiki-and-the-zend-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Audio in Linux</title>
		<link>http://www.oliverbrown.me.uk/2006/07/22/audio-in-linux/</link>
		<comments>http://www.oliverbrown.me.uk/2006/07/22/audio-in-linux/#comments</comments>
		<pubDate>Sat, 22 Jul 2006 13:34:01 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/07/02/audio-in-linux/</guid>
		<description><![CDATA[I&#8217;ve started writing the page to actually play the audio clips in my language learning app. At the moment it loads the Windows Media Play plug in. This obviously won&#8217;t work on Linux so I have to ask, how do you play media files in a web browser when not on Windows? Flash would be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started writing the page to actually play the audio clips in my <a href="http://www.oliverbrown.me.uk/2006/07/17/back-to-language-learning/">language learning app</a>. At the moment it loads the <tag>Windows Media Play</tag> plug in. This obviously won&#8217;t work on Linux so I have to ask, how do you play media files in a web browser when not on <tag>Windows</tag>?</p>
<p>Flash would be the obvious answer I suppose but I have an uncommon requirement &#8211; I need to be able to access the object via Javascript. Specifically, I need to know when a track is finished and the next one begins (from a play list) and none of the freely available Flash media players do that.</p>
<p>Any advice from anyone?</p>
<p><tags>Linux, audio, media, music, Flash</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/07/22/audio-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet another XML based AJAX toolkit</title>
		<link>http://www.oliverbrown.me.uk/2006/06/29/yet-another-xml-based-ajax-toolkit/</link>
		<comments>http://www.oliverbrown.me.uk/2006/06/29/yet-another-xml-based-ajax-toolkit/#comments</comments>
		<pubDate>Thu, 29 Jun 2006 23:02:02 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/06/29/yet-another-xml-based-ajax-toolkit/</guid>
		<description><![CDATA[Jitsu is another AJAX toolkit. Like Backbase and Atlas it supports an XML based declaritive format that is parsed by JavaScript and converted into real HTML. This one is open source and free. Jitsu, ECMAScript, XHTML, Atlas, Backbase]]&#62;]]></description>
			<content:encoded><![CDATA[<p><![CDATA[<a href="http://www.jitsu.org/jitsu/">Jitsu</a> is another <tag>AJAX</tag> toolkit. Like <a href="http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax/">Backbase</a> and <a href="http://www.oliverbrown.me.uk/2006/06/22/aspnet-atlas-really-is-like-backbase/">Atlas</a> it supports an XML based declaritive format that is parsed by <tag>JavaScript</tag> and converted into real <tag>HTML</tag>.</p>
<p>This one is open source and free.</p>
<p><tags>Jitsu, ECMAScript, XHTML, Atlas, Backbase</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/06/29/yet-another-xml-based-ajax-toolkit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET Atlas really is like Backbase</title>
		<link>http://www.oliverbrown.me.uk/2006/06/22/aspnet-atlas-really-is-like-backbase/</link>
		<comments>http://www.oliverbrown.me.uk/2006/06/22/aspnet-atlas-really-is-like-backbase/#comments</comments>
		<pubDate>Thu, 22 Jun 2006 11:24:31 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/06/22/aspnet-atlas-really-is-like-backbase/</guid>
		<description><![CDATA[ASP.NET might not suck after all. Atlas for ASP.NET is a toolkit for doing AJAXy stuff. Well in fact it is quite a bit more than that. It has many features of the Google Web Toolkit (except in ASP.NET instead of Java) including serializing server side objects for use client side use. Interesting it also [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[It turns out that <a href="http://www.oliverbrown.me.uk/2006/04/27/aspnet-sucks/">ASP.NET might not suck</a> after all. <a href="http://msdn.microsoft.com/msdnmag/issues/06/07/AtlasAtLast/default.aspx">Atlas for ASP.NET</a> is a toolkit for doing AJAXy stuff.</p>
<p>Well in fact it is quite a bit more than that. It has many features of the <a href="http://www.oliverbrown.me.uk/2006/05/19/now-google-push-ajax-development/">Google Web Toolkit</a> (except in ASP.NET instead of <tag>Java</tag>) including serializing server side objects for use client side use.</p>
<p>Interesting it also has a lot in common with <a href="http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax/">Backbase</a>. It allows you to embed some nifty XML to define a user interface which is then interpreted by the Javascript to render real (X)HTML.</p>
<p>The final irony is that it&#8217;s pretty much free. Since it&#8217;s .NET, to really use it you need Visual Studio, but the Atlas part itself is free and should be perfectly usable with the Express version of the Visual Studio projects.</p>
<p><tags>ASP, ASP.NET, AJAX, Javascript, XHTML, HTML, .NET, dotNet</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/06/22/aspnet-atlas-really-is-like-backbase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Firefox cleverity</title>
		<link>http://www.oliverbrown.me.uk/2006/06/03/another-firefox-cleverity/</link>
		<comments>http://www.oliverbrown.me.uk/2006/06/03/another-firefox-cleverity/#comments</comments>
		<pubDate>Sat, 03 Jun 2006 01:30:35 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/06/01/another-firefox-cleverity/</guid>
		<description><![CDATA[A lot of people love Firefox and seems to thin that loving it is "obvious". This is despite the fact that it just eats up memory. Not only that but it keeps it regardless (if you minimise most programs on Windows they free up most of their memory). There are uses for it, most of [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[Cleverity? Something that is clever. If that word really exists I should get an award.</p>
<p>A lot of people love Firefox and seems to thin that loving it is "obvious". This is despite the fact that it just eats up memory. Not only that but it keeps it regardless (if you minimise most programs on Windows they free up most of their memory).</p>
<p>There are uses for it, most of them for developers. The DOM explorer and JavaScript debug consoles are absolute necessities. But another cool feature I've found is "View Selection Source". Highlight part of a web page, right-click and you can view the source just for that bit. Yay :)</p>
<p><tags>Firefox, browsers, DOM</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/06/03/another-firefox-cleverity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D gaming in Firefox and Safari</title>
		<link>http://www.oliverbrown.me.uk/2006/05/31/3d-gaming-in-firefox-and-safari/</link>
		<comments>http://www.oliverbrown.me.uk/2006/05/31/3d-gaming-in-firefox-and-safari/#comments</comments>
		<pubDate>Wed, 31 May 2006 15:13:20 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/05/31/3d-gaming-in-firefox-and-safari/</guid>
		<description><![CDATA[canvas element with some clever JavaScript, someone has written a basic ray-traced 3D graphics engine that runs in Safari and Firefox. Okay so "3D gaming" if overstating it slightly, but it's clever. What's double clever is that you can get a pure JavaScript implementation of canvas for Internet Explorer from Google Code. Which means technically [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[Using the <code>canvas</code> element with some clever JavaScript, someone has written a basic ray-traced 3D graphics engine that runs in <tag>Safari</tag> and <tag>Firefox</tag>.</p>
<p>Okay so "3D gaming" if overstating it slightly, but it's clever.</p>
<p>What's double clever is that you can get a <a href="http://excanvas.sourceforge.net/">pure JavaScript implementation</a> of <code>canvas</code> for <tag>Internet Explorer</tag> from Google Code. Which means technically you can now do 3D graphics using JavaScript and a browser...</p>
<p><tags>canvas, IE</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/05/31/3d-gaming-in-firefox-and-safari/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Now Google push AJAX development</title>
		<link>http://www.oliverbrown.me.uk/2006/05/19/now-google-push-ajax-development/</link>
		<comments>http://www.oliverbrown.me.uk/2006/05/19/now-google-push-ajax-development/#comments</comments>
		<pubDate>Fri, 19 May 2006 12:27:24 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/05/19/now-google-push-ajax-development/</guid>
		<description><![CDATA[posted about BackBase, an expensive (for commercial use) AJAX development thingy*. Well Google have produced something similar for free Google Web Toolkit. Although the end results are the same (as far as the user is concerned) there are important differences. The BackBase software is entirely client side. You write server stuff as normal, output BackBase [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[I recently <a href="http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax/">posted about BackBase</a>, an expensive (for commercial use) AJAX development thingy*. Well Google have produced something similar for free <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a>.</p>
<p>Although the end results are the same (as far as the user is concerned) there are important differences. The BackBase software is entirely client side. You write server stuff as normal, output BackBase code and the browser with JavaScript handles everything. The Google system is client and server orientated and odes more work on the server. The server also has to be running Java. It also has better browser support.</p>
<p>This could be a reason for me to learn Java, something I&#8217;ve managed to avoid for quite a while now&#8230;</p>
<p>* It&#8217;s actually an XML based markup language combined with a real time JavaScript processing engine.</p>
<p><tags>Backbase, AJAX, WebToolkit, GWT, Java</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/05/19/now-google-push-ajax-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multiple forms in ASP.NET</title>
		<link>http://www.oliverbrown.me.uk/2006/05/09/multiple-forms-in-aspnet/</link>
		<comments>http://www.oliverbrown.me.uk/2006/05/09/multiple-forms-in-aspnet/#comments</comments>
		<pubDate>Tue, 09 May 2006 11:52:42 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/05/09/multiple-forms-in-aspnet/</guid>
		<description><![CDATA[HTMLpage itself actually holding two of them. Of course that could be wrong. Essentially all you have to do is load the extra forms using AJAX and I think everything will work. (I'm working a on a page (not in ASP.NET) that has a table of data with a status column. Each column needed to [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[I previously ranted that being unable to have two ASP controlled forms in a single ASP.NET page is a serious flaw. They may be a way round it though. I would assume that ASP.NET can't output two "smart" forms (the ones with <code>runat=&#8221;server&#8221;</code>) on the same page but I'm pretty sure that there is nothing stopping a <tag>HTML</tag>page itself actually holding two of them. Of course that could be wrong.</p>
<p>Essentially all you have to do is load the extra forms using AJAX and I think everything will work.</p>
<p>(I'm working a on a page (not in ASP.NET) that has a table of data with a status column. Each column needed to have a drop down box letting you change the status. Since the number of statuses is large I decided to have a link that AJAXly changed into the dropdown box and a button when you clicked it. Of course you could click all the links and not submit any of the forms leaving you with a page that actually has a bout 30 forms on it.)</p>
<p><tags>ASP.NET, ASP, AJAX</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/05/09/multiple-forms-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BackBase really pushing AJAX</title>
		<link>http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax/</link>
		<comments>http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax/#comments</comments>
		<pubDate>Fri, 05 May 2006 11:59:55 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax-2/</guid>
		<description><![CDATA[BackBase is another AJAX toolkit. This one is different though. It&#8217;s not really an AJAX toolkit, more a toolkit powered by JavaScript taking advantage of AJAX. The clue is the price. Yes it has a price &#8211; $2000 to be exact. There is a &#8220;community edition&#8221; that is free for personal use though. Anyway, I [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[<tag>BackBase</tag> is another <tag>AJAX</tag> toolkit. This one is different though. It&#8217;s not really an AJAX toolkit, more a toolkit powered by <tag>JavaScript</tag> taking advantage of AJAX. The clue is the price. Yes it has a price &#8211; $2000 to be exact. There is a &#8220;community edition&#8221; that is free for personal use though.</p>
<p>Anyway, I don&#8217;t have time to run down all the features but basically it defines a whole new bunch of tags allowing you to create complicated content in a declarative HTML style way. These tags are then translated into proper <tag>XHTML</tag> on the fly by the back end JavaScript engine. Since the clever work is actually handled by the browser, you&#8217;re free to use whatever you like on the server (PHP, <tag>Ruby</tag>) including static HTML pages &#8211; outputting <tag>BXML</tag> is no different to outputting <tag>HTML</tag>.</p>
<p>In fact BXML has a very <tag>ASP.NET</tag> feel to it and embedding BXML into an XHTML page along with ASP content could have the ultimate cleanness about it (syntax isn&#8217;t one of my <a href="http://www.oliverbrown.me.uk/2006/04/27/aspnet-sucks/">complaints about ASP.NET</a>). It should be noted that Microsoft are working on <tag>Atlas</tag> which could be something very similar but I haven&#8217;t looked into it&#8230;</p>
<p>It all seems very clever.</p>
<p><a href="http://www.backbase.com/">BackBase</a><br />
<a href="http://www.backbase.com/demos/explorer/">BackBase Demos</a><br />
<a href="http://atlas.asp.net/">ASP.NET Atlas</a></p>
<p><tags>ASP</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/05/05/backbase-really-pushing-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silly things with JavaScript closures</title>
		<link>http://www.oliverbrown.me.uk/2006/05/02/silly-things-with-javascript-closures/</link>
		<comments>http://www.oliverbrown.me.uk/2006/05/02/silly-things-with-javascript-closures/#comments</comments>
		<pubDate>Tue, 02 May 2006 13:20:51 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.oliverbrown.me.uk/2006/05/02/silly-things-with-javascript-closures/</guid>
		<description><![CDATA[JavaScript is immensely cool. You can do some amazing things with it. Although I&#8217;m not entirely sure whether you should. For example I had a bunch of elements on a page I needed to update using AJAX. I needed a function I could pass the URLs and ids of elements to replace with those URLs [...]]]></description>
			<content:encoded><![CDATA[<p><![CDATA[From a theoretical programming point of view, <tag>JavaScript</tag> is immensely cool. You can do some amazing things with it. Although I&#8217;m not entirely sure whether you should.</p>
<p>For example I had a bunch of elements on a page I needed to update using <tag>AJAX</tag>. I needed a function I could pass the URLs and ids of elements to replace with those URLs and then have it perform each replacement in turn (I&#8217;ve seen <tag>IE</tag> have problems with simultaneous AJAX requests).</p>
<p>First I replace a simple <code>replace_id</code> function that accepts three arguments. An element id, a URL to GET to replace its contents with and finally a function to be called when it&#8217;s all completed.</p>
<p>And then things got silly.</p>
<p><code>function chain_replace(urls, ids)</code><br />
<code>{</code><br />
<code>&nbsp;&nbsp;id = 0;</code><br />
<code>&nbsp;&nbsp;next_id = function()</code><br />
<code>&nbsp;&nbsp;{</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;if (id < = ids.length)</code><br />
</code><code>&nbsp;&nbsp;&nbsp;&nbsp;{</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return function()</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace_id(urls[id], ids[id++], next_id());</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;}</code><br />
<code>&nbsp;&nbsp;}</code><br />
<code>&nbsp;&nbsp;next_id()();</code><br />
<code>}</code></p>
<p>Now the <code>next_id()();</code> bit towards the end should be a clue that something a little odd is going on. But I must confirm that this code does actually work. With enough arguments it might make the browser explode with some sort of call stack problem though&#8230;</p>
<p><tags>closures</tags>]]&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliverbrown.me.uk/2006/05/02/silly-things-with-javascript-closures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: www.oliverbrown.me.uk @ 2012-02-08 19:31:17 -->
