<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Michael John Grove :: One developers guide to sanity :: Blog ::</title>
	
	<link>http://www.darwinshome.za.net/blog</link>
	<description>A tech guide by darwinshome</description>
	<pubDate>Tue, 22 Sep 2009 11:32:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/OneDevelopersGuideToSanity" type="application/rss+xml" /><feedburner:emailServiceId>OneDevelopersGuideToSanity</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Large Prints - My Epson Stylus Photo 1410 Experience</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/PrqAR-dAzDU/</link>
		<comments>http://www.darwinshome.za.net/blog/2009/09/epson_stylus-photo-1410/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 12:23:18 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/?p=148</guid>
		<description><![CDATA[A couple of months back my wife completed a photography course and following the course she purchased a Canon 450D digital camera. 
Taking photos, getting the right light, getting that perfect shot, is all well and good – But looking at the results on a computer screen does not always do the photo justice.
The normal [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of months back my wife completed a photography course and following the course she purchased a Canon 450D digital camera. </p>
<p>Taking photos, getting the right light, getting that perfect shot, is all well and good – But looking at the results on a computer screen does not always do the photo justice.</p>
<p>The normal process to print the brilliant shot was to save it onto a flash drive, take that drive to the nearest (half decent) print lab and have them print the photo to the size needed; this process is all well and good if the photo lab gets the print right, the lab is open, the lab is currently able to print and you have the right amount of money – Photos are sometimes ridiculously expensive (especially for the A3 size)</p>
<p><strong>So how do you avoid the above troubles? </strong></p>
<p><img src="http://darwinshome.za.net/uploads/epson1410.gif" alt="Epson Stylus Photo 1410 A3+ printer" /><br />
<span id="more-148"></span><br />
I recently had the opportunity to try out my first large scale (A3+) photo printer, the <strong>Epson Stylus Photo 1410 A3+ six-colour photo printer</strong> is a great photo only printer for use in the home office or study and produces stunning photographic prints when using high end photographic paper.</p>
<p>This large printer is widely available and although not super cheap – the printer comes in around R 3500 (~$ 450) – it does the job superbly. (Even if it does eat through R 200 cartridges at an alarming rate when printing full A3 borderless prints)</p>
<p>This printer has a few drawbacks, with the first and most obvious one is the sheer size of an A3+ printer. You will need a large desk to accommodate this baby. This isn&#8217;t really all that bad though, as you would have a similar issue with almost any A3 printer.</p>
<p>As the name implies the Epson Stylus Photo 1410 is a photo only printer so it is not recommended as your only printer and definitely should not be used for normal text on plain white paper printing – Although it can do that too.</p>
<p>You should spend the extra money on the Epson Photo Glossy Paper (between R 400 and R 800 for a 10 pack A3), in my tests printing on HP photo paper was a complete failure with the Epson ink not drying and in places flaking and cracking.<br />
Generic photo paper did work and the prints were superb, but in comparison to the Epson photo paper, the generic paper prints were bland.</p>
<p>Drawbacks aside, this printer is <em>amazing</em>. It is simple to setup and install and with the built in <a href="http://en.wikipedia.org/wiki/PictBridge">PictBridge</a> support you can even print directly from your camera without setting up the PC.</p>
<p>Printing borderless images was easy, almost silent and extremely quick (to print the image on A3 and for the ink to dry on the page)</p>
<p>The printer has 6 different ink cartridges (one for each colour) so it does help with keeping costs down as you only need to replace the depleted colour, and not the whole set when you run out on one.</p>
<p>The Epson Stylus Photo 1410 is not going to be the printer for everyone but for any photo enthusiasts, if you&#8217;re looking for a good photo printer, I believe this one is it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2009/09/epson_stylus-photo-1410/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2009/09/epson_stylus-photo-1410/</feedburner:origLink></item>
		<item>
		<title>Website/Blog/Life - The updates</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/1y1pV0AR-4Y/</link>
		<comments>http://www.darwinshome.za.net/blog/2009/06/website_blog_life_updates/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 10:55:32 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/?p=134</guid>
		<description><![CDATA[Nasty little bugger
I have managed, after much fighting and arguing, invited the flu in for a visit - as per usual the chap is going to stick around for a week (or two), then leave without so much as leaving a thank you note.
I do not normally get sick - I may get a sniffle [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Nasty little bugger</strong></p>
<p>I have managed, after much fighting and arguing, invited the flu in for a visit - as per usual the chap is going to stick around for a week (or two), then leave without so much as leaving a thank you note.</p>
<p>I do not normally get sick - I may get a sniffle for a day (during which time I am the worst person to be near because I am a &#8216;carrier&#8217; of said sickness) the next day I am healthy and well but every other soul within a 5km radius has the full blown flu. </p>
<p>For me to get properly sick (as I am now) I must have completely ruined my immune system by doing something stupid, and in this case it was overworking the brain - behind the computer screen - without rest for the past 5 weeks.</p>
<p><strong>Busy Worker: The Office</strong><br />
<span id="more-134"></span><br />
<a href="http://www.acgworld.com/"><em>The office work: ACG World</em></a><br />
<a href="http://www.acgworld.com/"><img src="http://darwinshome.za.net/uploads/acgwork.gif" alt="ACG World Website Work" /></a></p>
<p>A work in progress that is almost two years in the making was finally released in March this year - Two months later when the company is finally ready to go live with our system and bugs appear out of the wood work. A few stressful days later all the problems are resolved. </p>
<p><em>The office work: Investec</em><br />
<img src="http://darwinshome.za.net/uploads/investecwork.gif" alt="Investec Presentation Work" /><br />
It has been a while since I stood in front of a bunch of people and attempted to teach them important stuff. In the case of Investec I was contracted out to train the new staff in their current Anti-Money laundering product (SIDE SafeWatch). I made way too big a mountain out of this training molehill.</p>
<p><strong>Busy Worker: Freelance</strong></p>
<p>Taking on website work on the side for some spare cash sounds like a great idea, until you try and do it.</p>
<p><a href="http://www.sandbox.co.za/"><em>Freelance: Sandbox Holdings</em></a><br />
<a href="http://www.sandbox.co.za/"><img src="http://darwinshome.za.net/uploads/sandboxwork.gif" alt="Sandbox Holdings Website Work" /></a></p>
<p>Originally Sandbox Technologies, this company has grown much since it put up its first website.  One afternoon last year (in passing) I offered to redesign their website . A couple of interesting weeks later their website is ready - a few months later I get word to finally make it live. What do you know, a few new bugs to fix.</p>
<p><a href="http://thegatewayacademy.org.uk/"><em>The Gateway Academy</em></a><br />
<a href="http://thegatewayacademy.org.uk/"><img src="http://darwinshome.za.net/uploads/gatewaywork.gif" alt="The Gateway Academy Website Work" /></a></p>
<p>A project that has been testing (and is still stretching) my PHP abilities. A real fun project that has come to fore with deadlines over the past weeks. This project is unique in that it is my first attempt at doing a job for someone I have never met (client is based in the UK).</p>
<p><a href="http://www.poken.co.za/"><em>New Freelance: Poken South Africa</em></a><br />
<img src="http://darwinshome.za.net/uploads/poken_logo.png" alt="Poken mini logo" class="float-left" />Currently I am throwing together some ideas for Tim Lunn and the team at Poken South Africa. Helping them get a great and functional website for selling their wonderful Poken to the African markets.</p>
<p>(I own a Panda Poken for anyone that is interested)</p>
<p><a href="http://www.bodythrills.co.za/"><em>New Freelance: Body Thrills</em></a><br />
<img src="http://darwinshome.za.net/uploads/bodythrillswork.gif" alt="Body Thrills Logo"  class="float-left" />ExMi, the beautiful lady and author of <a href="http://www.expensivemistakescheapthrills.co.za/">Expensive Mistakes Cheap Thrills</a> needs to take <a href="http://www.bodythrills.co.za/">her &#8216;coming soon&#8217; online store</a> into the live &#8216;I am open for business&#8217; state, I am lending a helping hand.</p>
<p><strong>Not a lot of work / A whole bunch of work</strong></p>
<p>Most of the work above falls under short term projects, smaller projects that shouldn&#8217;t take too long to complete. But when I  have limited time for some (the freelance work can only be done outside of office hours), normal household work, and a small dose of emotional unrest at the home into the mix - all my wonderful, well laid out, plans go for a ball of rubbish.</p>
<p>All of the small projects deadlines hit at the same time, and with the already existent stress, my body failed me and flu popped in for a visit.</p>
<p>Some projects have passed, some are still here, and some are only just starting - Thank goodness I made all those TO DO lists last week, else this little bite of flu that I am kicking out by Friday could have been full blown bronchitis (or even that nasty Pig Flu everyone is talking about)</p>
<p><strong>I am learning through experience (you know, the hard way!)</strong></p>
<p>In a different way, but with the same result, I, like <a href="http://blondore.co.za/listen-to-your-body/">Blondore</a> have learnt my lesson - Listen to your body when it tells you enough is enough. </p>
<p>I may not have ever avoided the flu this year, even if I did get down and re-work my time management lists and get down to business; unforeseen circumstance may still have screwed me over.</p>
<p>If it be lots of &#8216;little bits&#8217; of work incorrectly managed - hitting you all at one, emotional stress from a particular incident, or just plain over worked and under paid, ask yourself: <em>Am I listening to what my body is telling me? Is my body telling me to relax?</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2009/06/website_blog_life_updates/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2009/06/website_blog_life_updates/</feedburner:origLink></item>
		<item>
		<title>The difficulties of writing</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/unJpQ3NflgE/</link>
		<comments>http://www.darwinshome.za.net/blog/2009/06/the-difficulties-of-writing/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 20:26:40 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/?p=75</guid>
		<description><![CDATA[
Go Away. I iz writing my memoirs&#8230;  Image credit: misshepeshu 
The difficulty of blog writing
Maintaining a blog does not usually come easy, most of us in the blog space need to work really hard to maintain our blogs outside of our regular work, and with the need for regular and interesting content updates, the [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://www.darwinshome.za.net/uploads/writers_block.jpg" title="Writers Block" class="aligncenter" width="450" height="338" /><br />
<small><em>Go Away. I iz writing my memoirs&#8230; </em> <a href="http://www.flickr.com/photos/misshepeshu/3420624986/">Image credit: misshepeshu </a></small></p>
<p><strong>The difficulty of blog writing</strong></p>
<p>Maintaining a blog does not usually come easy, most of us in the blog space need to <a href="http://metrodad.typepad.com/index/2005/12/blogging_is_har.html">work really hard</a> to maintain our blogs outside of our regular work, and with the need for<a href="http://blindcripple.wordpress.com/2009/05/20/a-little-something-about-bloggers-block/"> regular and interesting content updates</a>, the odd blog/website design change, replying to comments, and managing your online persona in general - all while attempting to win one of the categories in the next Blog awards - Suddenly having a blog may seem more work than it is worth.</p>
<p>For some (including me) blog writing is not our main talent, words do not seem to flow as easily as it does for those that place beautiful prose on the web with little to no effort. </p>
<p>Suggested writing inabilities aside, even if you have the most wonderful and interesting stories to share; should you forget to post on your blog one too many times (the biggest bloggers sin I am guilty of) you will watch it die a slow and often painful Internet interest withdrawal death. Should you allow this this fatal blog sickness to pass, reviving your blog to its former glory will be one of the most difficult online things you may ever do.</p>
<p><strong>What I am doing to repent my blogging sins</strong></p>
<p>The final result? Unsuccessful blog that will remain obscurity or Successful blog revival - I will investigate, and hopefully find, the root cause within myself and my daily/general habits that lead me down the path of the &#8220;once every three month post&#8221; blogging style my own blog is now following. A studied choice which will offer me one of the following result options:</p>
<ol>
<li>Should I keep this blog and maintain it properly (an all round improvement) OR</li>
<li>Permanently archive my blog (maintaining my current &#8220;Odd occasion and blue moon posting&#8221; habits) OR</li>
<li>Remove my blog entirely - let Twitter be my blog</li>
</ol>
<p><span id="more-75"></span><br />
<strong>Looking to self</strong></p>
<p>My investigation, actually a personal review, is focused on how <strong>I</strong> operate online and the reasons why <strong>I</strong> have difficulty keeping up this blog. I mention other blogs that have helped me understand where i have gone wrong and those that have provided inspiration going forward. If you as a new blogger getting started or an old one wondering if it is still worth it can find similar inspiration from the post, I wish you well in reaching your goals.</p>
<p><strong>Digging deep</strong></p>
<p>The reasons (yes, excuses would also work) for my lack of regular blog updates:</p>
<ol>
<li>I have never made this blog personal</li>
<li>Having this blog has always been an afterthought</li>
<li>I never attempted to form a &#8216;blogging habit&#8217;</li>
<li>Allowed self doubt about blog/website design to affect my writing</li>
</ol>
<p><strong>1. I have never made this blog personal</strong><br />
When i registered <a href="http://www.darwinshome.za.net">darwinshome.za.net</a> I had the intention of using the website as my personal business front-end or an online resume of the work I had done - a place where I could send my (hopefully) future employers to, to gauge my skills in the field I professed to be an expert in. So when I added a blog, I kept most of the posts related to technology news (usually re-hashing stories I had seen on the <a href="http://news.bbc.co.uk/2/hi/technology/default.stm">BBC News website</a> or heard about on the <a href="http://reviews.cnet.com/buzz-out-loud-podcast/">Buzz Out Loud podcast</a>)</p>
<p>With the exception of <a href="http://www.darwinshome.za.net/blog/2008/03/social-networking-images-and-links/">these</a> <a href="http://www.darwinshome.za.net/blog/2008/02/country-selection-list-with-sate-and-province/">three</a> <a href="http://www.darwinshome.za.net/blog/2007/04/twitter-vs-jaiku/">posts</a>, my real opinions, thoughts or original ideas and work remained in my head and off the blog. </p>
<p>Even when I  obtained a LiveJournal blog to separate the &#8220;personal&#8221; posts from any &#8220;work&#8221; posts, I seldom blogged anything substantial (I have since decomissioned my LiveJournal blog and imported all reasonably original posts into this blog)</p>
<p><strong>2. Having this blog has always been an afterthought</strong><br />
This website started out as a PHP project, then became a resume of sorts, at the time adding a blog was the thing to do if you had your own website. My priority then was to have a working website, with a recent copy of my curriculum vitae for download. Having this blog on my website was more a navigation space filler than an actual attempt at flexing my writing muscles. </p>
<p>This website has come a long way since 2003, the habit of website first, blog second has remained.</p>
<p><img alt="" src="http://www.darwinshome.za.net/uploads/writers_block1.jpg" title="Forgotten" class="aligncenter" width="450" height="299" /><br />
<small><em>Frank the typewriter felt forgotten and used&#8230; being only used for one, oh so special,  night</em> <a href="http://www.flickr.com/photos/thorinside/675520667/"> Image credit: thorinside</a></small></p>
<p><strong>3. I never attempted to form a &#8216;blogging habit&#8217;</strong><br />
A blog is not a hobby that can be put down and forgotten, to be easily dusted off and shined when the mood takes you. If you forget about your blog for any extended period, anyone that has an interest in your ramblings will move on to more interesting blogs (or blogs that <strong>are</strong> updated) neglect your blog  often enough and even those people will not return. </p>
<p>I have never made the conscious decisions to write a blog post  regularly. I have never forced myself to put in the required time to write something meaningful (even if it is just meaningful to me) <em>at least once</em> every week. </p>
<p>This lack of &#8216;blogging habit&#8217; has been my biggest downfall (and until recently it was also the reason I was not a true user of my gym contract: no gym habit = no real gym use).</p>
<p><strong>4. Allowed self doubt about blog/website design to affect my writing</strong><br />
When I redesign my website (which is a task I perform far to rarely) I am all excited about the look and feel, and for a few weeks (or even months) I will put a little more effort into my blogging. </p>
<p>As time passes, my grey, rather flat website, with its outdated layout starts to <em>really</em> bug me; this self doubt and self deprecation turns me away from my website, and rather than turning me to designing a new layout it just turns me away from blogging on it.</p>
<p><strong>What is a guy to do?</strong></p>
<p>After having a few weeks of emotional strain (in almost every facet of my life) I started to make lists; To do lists of everykind - shopping lists, daily routine lists, workout lists, gym timetable lists, and even a blog list.</p>
<p>I realized that I wanted to spend enough time on my blog to maintain it, and keep it regularly updated - without limiting the rest of my life - <em>and it is possible</em>. So I guess my decision is made, out of the options I listed above for the outcome of my internal reviews, the only one that makes sense to me personally is;</p>
<ul>
<li><strong>I should keep this blog and maintain it properly</strong></li>
</ul>
<p><strong>Where the hope was found</strong> OR &#8220;<em>That light at the end of the tunnel is not a train, but a friend (holding a flashlight) on their way to help</em>&#8221;</p>
<p>Reaching this epiphany did not come without assistance; for one, <a href="http://twitter.com/darwinshome">Twitter</a>, and the wonderful community of people I follow there has placed me in a different mind set - having conversations with people there has actually changed the way I view business and people interaction. This could also be one of the few documented cases of Twitter turning someone <em>towards</em> blogging an not away from it.</p>
<p>The other assistance I got was in the form of a solid kick in the pants I received from <a href="http://snowgoose.co.za/">Heidi</a> and <a href="http://www.shebee.co.za/">Sheena</a>, both  told me to &#8220;buck up and just write&#8221; in their own special ways, on separate occasions. I took it to heart. </p>
<p>A big thank you to you both.</p>
<p><strong>Where to from here?</strong></p>
<p>I believe this is one of the Lengthiest posts I have written, and it should remain the exception - I remain a fan of the slightly shorter - more to the point style of blogging. This posts topic required a long internal process, and I thought I would make up for lost writing time in the process.</p>
<p>The first step <strong>goal </strong>for this blog - get a post (even a small post) of meaningful content out at least once a week. </p>
<p>Lets see how that goes for a month.</p>
<p><strong>To the rest of you</strong></p>
<p>What are your feelings on your own bloggers block? Do you get it? How do you get over it?<br />
To those just moaning that it is too difficult to maintain a blog: Buck up and write what you feel. If you want your blog to work, PUT IN THE EFFORT!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2009/06/the-difficulties-of-writing/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2009/06/the-difficulties-of-writing/</feedburner:origLink></item>
		<item>
		<title>50 Things - A meme</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/nXXdZyiulh4/</link>
		<comments>http://www.darwinshome.za.net/blog/2009/04/50-things-a-meme/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 21:02:45 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[meme]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2009/04/17/50-things-a-meme/</guid>
		<description><![CDATA[Compliments of Heidi I have been tagged (for the first time mind you) to fill in this 50 question internet meme.
So without further ado:

8. What do you prefer to drink in the morning? 
1. Do you like Blue Cheese?
I dislike the smell enough to have never tried blue cheese. Will let you know when I [...]]]></description>
			<content:encoded><![CDATA[<p>Compliments of <a href="http://snowgoose.co.za/50-arb-things-about-me/">Heidi</a> I have been tagged (for the first time mind you) to fill in this 50 question <a href="http://en.wikipedia.org/wiki/Internet_meme">internet meme</a>.</p>
<p>So without further ado:<br />
<img src="http://darwinshome.za.net/uploads/mornings.jpg" alt="OJ Coffee Ice Water" /><br />
<small><em>8. What do you prefer to drink in the morning?</em> </small></p>
<p><strong>1. Do you like Blue Cheese?</strong><br />
I dislike the smell enough to have never tried blue cheese. Will let you know when I do.</p>
<p><strong>2. Have you ever smoked heroin? </strong><br />
Nope.</p>
<p><strong>3. Do you own a gun?</strong><br />
Nope, and doubt I ever will&#8230; Went shooting at a range with some friends a few months back - Guns do <em>way</em> too much damage <em>way</em> too eaasily.</p>
<p><strong>4: This number is missing. </strong><br />
Nope. See.. number <strong>4</strong>. is right there, just a little left of &#8220;This&#8221;.</p>
<p><strong>5. Do you get nervous before doctor appointments? </strong><br />
Not since my first HIV test 10 years ago.</p>
<p><strong>6. Real or fake nails? </strong><br />
I save the fake ones for special people on special days - I will tell no more.</p>
<p><strong>7. Favorite Christmas song? </strong><br />
I worked in retail for 5 years. There are none that I still enjoy.</p>
<p><strong>8. What do you prefer to drink in the morning? </strong><br />
Orange Juice (the fresher the better), Coffee, Ice Water - In that order, and preferably all every morning.<br />
<span id="more-74"></span></p>
<p><strong>9. Can you do push ups? </strong><br />
Yes. More gym to do more than 30 without effort is required</p>
<p><strong>10. Whatâ€™s your favorite piece of jewellery? </strong><br />
I only own a wedding band and a <a href="http://en.wikipedia.org/wiki/Saint_Christopher">Saint Christopher</a> chain. No favorites - Come on I&#8217;m a guy, give me some men type questions&#8230;</p>
<p><strong>11. Favourite hobb</strong>y?<br />
Collecting and reading books - It is the only hobby that has past the test of time with me.</p>
<p><strong>12. Do you have A.D.D.? </strong><br />
I don&#8217;t really believe it exists&#8230; No I do not have A.D.D.</p>
<p><strong>13. Whatâ€™s one trait that you hate about yourself? </strong><br />
Recent bouts of serious procrastination.</p>
<p><strong>14. Middle Name? </strong><br />
John</p>
<p><strong>15. Name 3 thoughts at this exact moment: </strong><br />
TV Advert sucks (must be late) itchy back (whats the next question)</p>
<p><strong>16. Name 3 drinks you regularly drink: </strong><br />
Coffee, Water, Coke Lite</p>
<p><strong>17. Current worry right now? </strong><br />
Some over-spend on my part has left me in a less than comfortable financial position, Next month with be different and better - as it always is.</p>
<p><strong>18. Current hate right now? </strong><br />
Bad drivers</p>
<p><strong>19. Favourite place to be? </strong><br />
My Bed or a quiet place anywhere in the <a href="http://en.wikipedia.org/wiki/Drakensberg">Drakensberg</a></p>
<p><strong>20. How did you bring in the New Year? </strong><br />
At home with the wife - I believe we slept through the midnight tolls.</p>
<p><strong>21. Like to go? </strong><br />
Go Fast? Go Up? Go Down?  Depends on where you want to go&#8230; mostly: Yes</p>
<p><strong>22. Name three people who will complete this: </strong><br />
Doubt I could tag two people, never mind get them to actually do it.</p>
<p><strong>23. Do you own slippers? </strong><br />
Yip - comfy, woolie and brown.</p>
<p><strong>24. What colour shirt are you wearing? </strong><br />
Navy Blue pinstriped formal shirt (still in work clothes)</p>
<p><strong>25. Do you like sleeping on satin sheets?</strong><br />
Clean sheets is all I need.</p>
<p><strong>26. Can you whistle? </strong><br />
Yes, and surprisingly loudly for not actually knowing how to do it properly</p>
<p><strong>27. Favourite colour? </strong><br />
Blue seems to be the current winner</p>
<p><strong>28. Would you be a pirate? </strong><br />
Ninja</p>
<p><strong>29. What songs do you sing in the shower? </strong><br />
I shower in the shower&#8230; never anything else, especially singing.</p>
<p><strong>30. Favourite girlâ€™s name? </strong><br />
Samantha</p>
<p><strong>31. Favourite boyâ€™s name? </strong><br />
James ( I think&#8230; never really thought about it)</p>
<p><strong>32. Whatâ€™s in your pocket right now? </strong><br />
iPod Nano (left), Mobile phone (right)</p>
<p><strong>33. Last person that made you laugh? </strong><br />
Conrad - Today in the office</p>
<p><strong>34. Worst injury youâ€™ve ever had?</strong><br />
Broken leg and head graze when I was hit by a car during the last leg of a two day cycle tour.</p>
<p><strong>35. Do you love where you live? </strong><br />
Yes.</p>
<p><strong>36. How many TVâ€™s do you have in your house? </strong><br />
One&#8230; Do you need more?</p>
<p><strong>37. Who is your loudest friend? </strong><br />
Jeffery </p>
<p><strong>38. How many pets do you have? </strong><br />
One Green Iguana - We ain&#8217;t allowed other pets here.</p>
<p><strong>39. Someone have a crush on you? </strong><br />
If there is someone, they haven&#8217;t told me yet&#8230; hurry up and spill the beans already.</p>
<p><strong>40. What is your favourite book? </strong><br />
Tough one&#8230; mmm&#8230; &#8220;Eaters of the Dead&#8221; by Michael Crichton</p>
<p><strong>41. What is your favourite candy? </strong><br />
Dislike candy, enjoy chocolate. No real favorite.</p>
<p><strong>42. Favourite Sports Team? </strong><br />
<del datetime="2009-04-18T08:15:57+00:00">Arsenal</del> <del datetime="2009-04-18T08:15:57+00:00">The Lions</del> No idea really, I don&#8217;t watch too much sports.</p>
<p><strong>43. What were you doing at 12AM last night? </strong><br />
Turning out my reading light  - Just finished my chapter and it was time for bed.</p>
<p><strong>44. What was the first thing you thought of when you woke up?</strong><br />
Damn alarm&#8230; 10 more minutes.</p>
<p><strong>45. Worst habit? </strong><br />
I tend to let the study get very very untidy when I am working on a project (paper, notes, books everywhere), and it takes me ages before I clean it properly.</p>
<p><strong>46. Do you play an instrument? </strong><br />
Nope</p>
<p><strong>47 . How long does it take you to get to work? </strong><br />
30 to 40 min (Only because I am on the road at 5h40)</p>
<p><strong>48. Plans for the weekend? </strong><br />
Family get together Saturday, Freelance project Sunday - Sleep in between</p>
<p><strong>49 If you could eat anything in the world right this second?</strong><br />
I really feel for a great pizza right now&#8230; Wood fired pizza.</p>
<p><strong>50. Do you like the person who sent this to you?</strong><br />
Very much. </p>
<p>I Tag:<br />
<a href="http://moontan.co.za/blog">Old friend</a><br />
<a href="http://simiansgrunt.com/content/wordpress/">Grant / Karen</a><br />
<a href="http://blog.jsookha.com/">Jessel</a><br />
<a href="http://www.robinpietersen.com/lifestream/">Robin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2009/04/50-things-a-meme/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2009/04/50-things-a-meme/</feedburner:origLink></item>
		<item>
		<title>JHB March Tweetup Recap</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/xVbRM-i8nho/</link>
		<comments>http://www.darwinshome.za.net/blog/2009/03/jhb-march-tweetup-recap/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 19:54:01 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Social Networking]]></category>

		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2009/03/19/jhb-march-tweetup-recap/</guid>
		<description><![CDATA[
I enjoy social networking; it allows me to keep in touch with friends, family, and sometimes complete strangers relatively easily from the comfort of my desk. 
I love meeting people; As much as social networks keep me in contact with my friends when I am stuck behind my desk, I still crave the interaction of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/darwinshome/sets/72157615515649499/"><img src="http://farm4.static.flickr.com/3656/3366894723_4357f2ae55.jpg" alt="Fun at a meet" style="width: 450px;" /></a></p>
<p>I enjoy social networking; it allows me to keep in touch with friends, family, and sometimes complete strangers relatively easily from the comfort of my desk. </p>
<p>I love meeting people; As much as social networks keep me in contact with my friends when I am stuck behind my desk, I still crave the interaction of actually meeting someone face-to-face and chatting about life over a coffee or a beer.</p>
<p>Going to the <a href="http://snowgoose.co.za/another-tweetup-gaby-rosario-is-in-jozi-soon/">Twitter meet at The Baron in Santon last night</a> was definitely the most fun way to meet the like minded souls I know online, get the face-to-face interaction I crave and as an added bonus I got to meet a whole bunch of new and interesting people and play with a couple of cool gadgets. </p>
<p>One of the cute/fun gadgets that floated around the table during the evening were the social contact sharing <a href="http://www.poken.co.za/">Poken</a> devices, which I believe are only recently trying to make a mark in the South African scene. The Poken is a small USB / RFID reader that can â€œhigh-fiveâ€ another Poken device, thereby transferring your pre-selected social network contact details to the other Poken. </p>
<p>The whole process is a much quicker and easier (albeit geekier) way to share contacts  than trying to figure out how to spell a Twitter username into your phone or even trying to save a phone number (I remember the days I tried to get a number in a noisy club and couldnâ€™t hear a word that was said). </p>
<p>When you get home, you plug in the USB portion of the Poken and it will update your selected online social network with the details of all the users you high-fived during the night.<br />
<img src="http://darwinshome.za.net/uploads/pandapoken.jpg" alt="Panda Poken" /><br />
I recall that the panda and the bee versions were popular among the ladies at the tweetup, and if you have a unique design, and have a need for a few extra Poken (say for corporate gifts) then you can get your own unique Poken design made.</p>
<p>The venue and service was good, even with us moving around a few times and being with some rain it didn&#8217;t bother us too much.</p>
<p>I had an absolute blast meeting and chatting with <a href="http://twitter.com/shebeegee">@SheBeeGee</a>, <a href="http://twitter.com/snowgoosesa">@SnowGooseSA</a>, <a href="http://twitter.com/nickjackson">@nickjackson</a>, <a href="http://twitter.com/walterpike">@Walterpike</a>, <a href="http://twitter.com/snappingturtle">@snappingturtle</a> and our guest of honour from Cape Town <a href="http://twitter.com/gabyrosario">@gabyrosario</a>. I will definitely set time aside to get to a meet like that again.</p>
<p>Thank you all.</p>
<p><a href="http://www.flickr.com/photos/darwinshome/sets/72157615515649499/">My pictures of the event are up on my flickr page</a> and I will link to <a href="http://twitter.com/craign">@craign</a>â€™s photos <del datetime="2009-03-23T09:09:32+00:00">as soon as he puts them online</del> <a href="http://www.facebook.com/album.php?aid=232252&#038;id=877800416">here</a> and <a href="http://www.facebook.com/album.php?aid=232262&#038;id=877800416#/album.php?aid=232262&#038;id=877800416">here</a> .</p>
<p><a href="http://www.poken.co.za/buy.html">Go here if you are interested in buying any Poken in SA</a>.</p>
<p>UPDATE: <a href="http://snowgoose.co.za/tweetup-at-the-baron-a-fantastic-night-out/">Heidi has added her update of the evening on her website</a>. A little more articulate than my post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2009/03/jhb-march-tweetup-recap/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2009/03/jhb-march-tweetup-recap/</feedburner:origLink></item>
		<item>
		<title>Not New Year Resolutions</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/_4RCZyZfjvA/</link>
		<comments>http://www.darwinshome.za.net/blog/2009/01/not-new-year-resolutions/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 07:37:10 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Something New]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2009/01/23/not-new-year-resolutions/</guid>
		<description><![CDATA[As the first month of 2009 draws to an end, the dust on most of the New Year resolutions is settling, I start to re-look at all the goal lists I have made in the past, review what I have completed, and add the items I want to do going forward.
I donâ€™t call these lists [...]]]></description>
			<content:encoded><![CDATA[<p>As the first month of 2009 draws to an end, the dust on most of the New Year resolutions is settling, I start to re-look at all the goal lists I have made in the past, review what I have completed, and add the items I want to do going forward.</p>
<p>I donâ€™t call these lists â€œNew Year resolutionsâ€ because they often have longer time requirements to complete that a year and I donâ€™t always start at the beginning of the year (Some are added in July).</p>
<p>So without further preamble, here is my current TODO list:</p>
<ol>
<li><strong>Increase my gym attendance from twice a week to 4 times a week.</strong><br />
This relates to losing some of the weight I have gained over the past few years and needs to be done in conjunction with following a healthier diet plan.
</li>
<li><strong>Get my Honours Degree out of the way.</strong><br />
This requires starting it (currently in July 2009) and finishing it in one to two years.</li>
<li><strong>Get one business off the ground and start another one.</strong><br />
This is half done with the start of Devmaxis (in partnership with three colleagues) and two business contracts secured. I would just like to have some more options outside of that businesses scope and therefore need to push for Darwinshome into its own niche markets.</li>
<li><strong>Do more for my online and offline communities.</strong><br />
Iâ€™m sure, subconsciously, that this is a refection of one of Barack Obamaâ€™s statements working its magic. Doing more for my community (real life socially and in a Web 2.0 sense) is a broad way of saying I have many little plans that I just need to finish. This should help kick the brain into gear if I forget.</li>
<li><strong>Pay off my car.</strong><br />
Some changes in work circumstances has placed me in a position to settle my car a year to a year and a bit early. So following up on actually doing that before August 2009 is a must.</li>
<li><strong>Purchase a new high end personal laptop.</strong><br />
I am still unsure as to what machine I want, and I have been looking very seriously at the new MacBook. But this is where spare cash comes into play â€“ I will make this a goal to complete before the end of November 2009. </li>
<li><strong>Develop one application outside of work.</strong><br />
Be it a twitter application, a Facebook application or a custom built web application. This serves twofold in that it helps expand my own skills and it could also be used to either benefit my business or social goals.</li>
<li><strong>Save enough spare to cash to take my wife overseas.</strong><br />
USA would be nice, but my wife has her heart set on Europe â€“ can you blame her? Italy here we come.</li>
</ol>
<p>I am sure there are more things to add (like &#8220;Blog More&#8221;), but for this post I think this list will do for now and actions do sometimes speak louder than words, here is the first step. I will update any on the list that I complete (if they can be &#8220;completed&#8221;).<br />
Have a great 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2009/01/not-new-year-resolutions/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2009/01/not-new-year-resolutions/</feedburner:origLink></item>
		<item>
		<title>Three Level XML to Javascript Drop Down List</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/hSrZ3tndnrE/</link>
		<comments>http://www.darwinshome.za.net/blog/2008/06/three-level-xml-to-javascript-drop-down-list/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 15:34:24 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2008/06/27/three-level-xml-to-javascript-drop-down-list/</guid>
		<description><![CDATA[Following a post on an Internet forum, here is a small expansion on my Country / State dropdown selection script  to enable a third level drop down. This additional level would allow for a  country / state / city drop down selection on an XML file as apposed to just a country / [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kirupa.com/forum/showthread.php?t=295701">Following a post on an Internet forum</a>, here is a small expansion on my <a href="http://www.darwinshome.za.net/blog/2008/03/02/javascript-xml-based-country-state-selection-script/">Country / State dropdown selection script</a>  to enable a third level drop down. This additional level would allow for a  <strong>country / state / city</strong> drop down selection on an XML file as apposed to just a <strong>country / state </strong>drop down selection.</p>
<p><span id="more-38"></span><br />
I have broken the code in this post into its three sections; the HTML, the XML and an external JavaScript file. All of the code can be downloaded here: <a class="downloadlink" href="http://www.darwinshome.za.net/blog/download/2" title="Version1 downloaded 29 times" >Three Level drop down list (29)</a>.</p>
<p><strong>A section of the HTML code:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">...
<span style="color: #339933;">&lt;</span>body <span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;fillCountryList();&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;</span>Country slection <span style="color: #339933;">-</span> <span style="color: #000066; font-weight: bold;">with</span> State<span style="color: #339933;">/</span>Province select<span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>select id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;cboCountry&quot;</span> onchange<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;fillStateList();&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">&gt;</span>Select a Country<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>select id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;cboState&quot;</span> onchange<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;fillCityList();&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">&gt;</span>Select a State<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>select id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;cboCity&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">&gt;</span>Select a City<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>The XML code:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;countries</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Country, State-Province, City selections&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">date</span>=<span style="color: #ff0000;">&quot;2008-Feb-05&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;country</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;USA&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;state</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;NY&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>New York<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>New Jersey<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>    
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/state<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;state</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;California&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Sanfransico<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hollywood<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>    
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/state<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/country<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;country</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;South Africa&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;state</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Gauteng&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Johannesburg<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Pretoria<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>    
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/state<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;state</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Kwazulu Natal&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Durban<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Pietermaritsburg<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/city<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>    
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/state<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/country<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/countries<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>A section of the Javascript code:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">...
<span style="color: #003366; font-weight: bold;">function</span> fillStateList<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">var</span> stateList <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cboState&quot;</span><span style="color: #009900;">&#41;</span>
&nbsp;
 <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> stateList.<span style="color: #660066;">options</span>.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> x <span style="color: #339933;">&gt;-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> x<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
     stateList.<span style="color: #660066;">options</span><span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">var</span> countryListSelected <span style="color: #339933;">=</span> 
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cboCountry&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">selectedIndex</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> numberStates <span style="color: #339933;">=</span> 
xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>countryListSelected<span style="color: #009900;">&#93;</span>
.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;state&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;=</span>numberStates<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> currentState <span style="color: #339933;">=</span>  
xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#91;</span>countryListSelected<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getElementsByTagName</span>
<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;state&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     fillList<span style="color: #009900;">&#40;</span>stateList<span style="color: #339933;">,</span>currentState<span style="color: #339933;">,</span>currentState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fillCityList<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">var</span> CityList <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cboCity&quot;</span><span style="color: #009900;">&#41;</span>
&nbsp;
     <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> CityList.<span style="color: #660066;">options</span>.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> x <span style="color: #339933;">&gt;-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> x<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
     CityList.<span style="color: #660066;">options</span><span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #003366; font-weight: bold;">var</span> countryListSelected <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span>
<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cboCountry&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">selectedIndex</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> StateListSelected <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span>
<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cboState&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">selectedIndex</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> numberCities <span style="color: #339933;">=</span> xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#91;</span>countryListSelected<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;state&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#91;</span>StateListSelected<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;city&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;=</span>numberCities<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
       <span style="color: #003366; font-weight: bold;">var</span> currentCity <span style="color: #339933;">=</span>  xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#91;</span>countryListSelected<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;state&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#91;</span>StateListSelected<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;city&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span><span style="color: #339933;">;</span>
     fillList<span style="color: #009900;">&#40;</span>CityList<span style="color: #339933;">,</span>currentCity<span style="color: #339933;">,</span>currentCity<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In a real world situation a full world wide <em>city</em> level dissection of data should not be stored in an <em>single </em>XML file as the amount of entries would place too much load on the XML file -More than likely the XML file would not load. To store all the city names across the world the use of a database to hold the data, and call the required data as needed, would better suit the needs.</p>
<p>This script can be used for any XML file in a similar format to handle multiple levels of data and placing the data into drop down lists.</p>
<p>The complete code for this example can be downloaded here: <a class="downloadlink" href="http://www.darwinshome.za.net/blog/download/2" title="Version1 downloaded 29 times" >Three Level drop down list (29)</a></p>
<p>Have fun and happy coding. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2008/06/three-level-xml-to-javascript-drop-down-list/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2008/06/three-level-xml-to-javascript-drop-down-list/</feedburner:origLink></item>
		<item>
		<title>New Designs all around</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/dcXrzTNxNVs/</link>
		<comments>http://www.darwinshome.za.net/blog/2008/03/new-designs-all-around/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 07:52:49 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2008/03/17/new-designs-all-around/</guid>
		<description><![CDATA[The regular visitors to my website would have noticed the new website structure and design that I finally got together; to say that I am proud of my work would be understating the huge pride I have in my website.
Humbleness aside, I have not been the only website to recently update it&#8217;s design:
TheOpenSurgery an open [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://darwinshome.za.net/uploads/newlook.gif" alt="new site design" />The regular visitors to my website would have noticed the new website structure and design that I finally got together; to say that I am proud of my work would be understating the huge pride I have in my website.</p>
<p>Humbleness aside, I have not been the only website to recently update it&#8217;s design:</p>
<p><a href="http://www.theopensurgery.com/15/new-site-design/">TheOpenSurgery</a> an open source and tutorial based  website by Jason Dugmore recently finished with updating a new layout and logo.</p>
<p><a href="http://www.techmongrel.com/13/techmongrel-receives-a-much-needed-design-change/">TechMongrel</a> another technology based tutorial and review website by Matthew Vorster had a great monster logo addition.</p>
<p>And lastly <a href="http://www.noboxmedia.com/15/the-springleapcom-web-based-image-manipulation-bundle/">NoBoxMedia</a> an Ajax, DHTML and JavaScript site by Robin Pietersen finishes off my list of new website updates (the <strong>Noboxmedia</strong> website update coincides with a SEO competition which <a href="http://www.springleap.com/posts/view/springleap-seo-competition-r4000-in-prizes">springleap.com</a> is currently running).</p>
<p>All three website owners are colleges from my University days and I believe these are excellent examples of great websites, for content and design, to assist any developer in today&#8217;s chaos of information.</p>
<p>A special Thank-you to Robin Pietersen for introducing me and teaching me the basics of Adobe Photoshop; I wouldn&#8217;t have been able to put my current or past website designs together without the initial teachings I got from him.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2008/03/new-designs-all-around/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2008/03/new-designs-all-around/</feedburner:origLink></item>
		<item>
		<title>Social Networking Images and Links</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/zh3_22_cL5I/</link>
		<comments>http://www.darwinshome.za.net/blog/2008/03/social-networking-images-and-links/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 09:57:48 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Graphics]]></category>

		<category><![CDATA[Social Networking]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2008/03/10/social-networking-images-and-links/</guid>
		<description><![CDATA[Getting your blog (and blog posts) out there into the Big Wide Internet can be difficult at the best of times, but trying to get people that do visit your website to help you out shouldn&#8217;t be.
Social Networking websites like Digg, Reddit, StumbleUpon and Facebook all have methods to allow their users to submit links [...]]]></description>
			<content:encoded><![CDATA[<p>Getting your blog (and blog posts) out there into the Big Wide Internet can be difficult at the best of times, but trying to get people that <strong>do</strong> visit your website to help you out shouldn&#8217;t be.</p>
<p>Social Networking websites like Digg, Reddit, StumbleUpon and Facebook all have methods to allow their users to submit links to web pages that they find interesting, funny or just worth sharing. Allowing these users to <strong>quickly</strong> and <strong>easily</strong> add your blog post to their favorite website is a must for any blogger.</p>
<p>Below I have started making available the images I made for use on <strong>darwinshome</strong> (both the current size of 20px X 20px and the previous incarnation of 45px X 45px). Listed with the images are the links used to submit your website page to that Social Networking website.</p>
<p>This is not currently the full list of all the social networking websites available, as the weeks progress I will add more to the list until complete.<br />
After a few weeks I will also design a wordpress plugin, <a href="http://www.goguide.co.za/blog/wordpress-plugin/">to join the ranks of many like it out there</a>, using the images and links listed. </p>
<p><strong>[YOUR LINK URL]</strong> means the full URL of your blog post on yout website (eg:  http:&#47;&#47;example.com&#47;post&#47; )<br />
<strong>[YOUR LINK TITLE]</strong> means the full title of the submitted page (eg: My Blog Post)</p>
<p><strong>In alphabetical order:</strong></p>
<p><strong>Bloglines</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/bloglines_20x20.gif" alt="Bloglines image small" /> <img src="http://darwinshome.za.net/uploads/swimages/bloglines_45x45.gif" alt="Bloglines image medium" /><br />
<code>http://www.bloglines.com/sub/[YOUR LINK URL]</code></p>
<p><strong>De.licio.us</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/delicious_20x20.gif" alt="de.licio.us image small" /> <img src="http://darwinshome.za.net/uploads/swimages/delicious_45x45.gif" alt="de.licio.us image medium" /><br />
<code>http://del.icio.us/post?url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>[More images and links after cut]</strong><br />
<span id="more-36"></span><br />
<strong>Digg</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/digg_20X20.gif" alt="Digg image small" /> <img src="http://darwinshome.za.net/uploads/swimages/digg_45x45.gif" alt="Digg image medium" /><br />
<code>http://digg.com/submit?phase=2&amp;url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>facebook</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/facebook_20x20.gif" alt="facebook image small" /> <img src="http://darwinshome.za.net/uploads/swimages/facebook_45x45.gif" alt="facebook image medium" /><br />
<code>http://www.facebook.com/share.php?u=[YOUR LINK URL]</code></p>
<p><strong>furl</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/furl_20x20.gif" alt="furl image small" /> <img src="http://darwinshome.za.net/uploads/swimages/furl_45x45.gif" alt="furl image medium" /><br />
<code>http://furl.net/storeIt.jsp?u=[YOUR LINK URL]&amp;t=[YOUR LINK TITLE]</code></p>
<p><strong>GoGuide</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/goguide_20x20.gif" alt="GoGuide image small" /> <img src="http://darwinshome.za.net/uploads/swimages/goguide_45x45.gif" alt="GoGuide image medium" /><br />
<code>http://www.goguide.co.za/submit.php?url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Google Bookmarks</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/google_20x20.gif" alt="Google Bookmark image small" /> <img src="http://darwinshome.za.net/uploads/swimages/google_45x45.gif" alt="Google Bookmark image medium" /><br />
<code><br />
http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>ma.gnolia</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/magnolia_20x20.gif" alt="magnolia image small" /> <img src="http://darwinshome.za.net/uploads/swimages/magnolia_45x45.gif" alt="magnolia image medium" /><br />
<code>http://ma.gnolia.com/bookmarklet/add?url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Muti</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/muti_20x20.gif" alt="Muti image small" /> <img src="http://darwinshome.za.net/uploads/swimages/muti_45x45.gif" alt="Muti image medium" /><br />
<code>http://muti.co.za/submit?url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Newsvine</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/newsvine_20x20.gif" alt="Newsvine image small" /> <img src="http://darwinshome.za.net/uploads/swimages/newsvine_45x45.gif" alt="Newsvine image medium" /><br />
<code>http://www.newsvine.com/_wine/save?u=[YOUR LINK URL]&amp;h=[YOUR LINK TITLE]</code></p>
<p><strong>Reddit</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/reddit20x20.gif" alt="Reddit  image small" /> <img src="http://darwinshome.za.net/uploads/swimages/reddit_45x45.gif" alt="Reddit image medium" /><br />
<code>http://reddit.com/submit?url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Sphere</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/sphere_20x20.gif" alt="Sphere image small" /> <img src="http://darwinshome.za.net/uploads/swimages/sphere_45x45.gif" alt="Sphere image medium" /><br />
<code>http://www.sphere.com/search?q=sphereit:[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Squidoo</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/squidoo_20x20.gif" alt="Squidoo image small" /> <img src="http://darwinshome.za.net/uploads/swimages/squidoo_45x45.gif" alt="Squidoo image medium" /><br />
<code>http://www.squidoo.com/lensmaster/bookmark?[YOUR LINK URL]</code></p>
<p><strong>StumbleUpon</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/stumble_20x20.gif" alt="StumbleUpon image small" /> <img src="http://darwinshome.za.net/uploads/swimages/stumble_45x45.gif" alt="StumbleUpon image medium" /><br />
<code>http://www.stumbleupon.com/submit?url=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Tailrank</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/tailrank_20x20.gif" alt="Tailrank image small" /> <img src="http://darwinshome.za.net/uploads/swimages/tailrank_45x45.gif" alt="Tailrank image medium" /><br />
<code>http://tailrank.com/share/?link_href=[YOUR LINK URL]&amp;title=[YOUR LINK TITLE]</code></p>
<p><strong>Technorati</strong><br />
<img src="http://darwinshome.za.net/uploads/swimages/technorati_20x20.gif" alt="Technorati image small" /> <img src="http://darwinshome.za.net/uploads/swimages/technorati__45x45.gif" alt="Technorati image medium" /><br />
<code>http://technorati.com/faves?add=[YOUR LINK URL]</code></p>
<p><strong>Instructions for downloading single images:</strong><br />
Internet Explorer:<br />
Right click on the image you want and select &#8220;Save Picture As&#8230;&#8221; to save the image you want.</p>
<p>Firefox and Safari:<br />
Right click on the image you want and select &#8220;Save Image As&#8230;&#8221; to save the image you want.</p>
<p>Opera:<br />
Right click on the image you want and select &#8220;Save image&#8230;&#8221; to save the image you want.</p>
<p><strong>Download complete set with links:</strong><br />
<a class="downloadlink" href="http://www.darwinshome.za.net/blog/download/3" title="Version2 downloaded 18 times" >Social Networking Images (18)</a> - [43.1 KB Zip file]</p>
<p><strong>[EDIT 11/03/2008]</strong> - Added Sphere, Squidoo, ma.gnolia, Bloglines, Tailrank and furl</p>
<p><strong>License and Copyright:</strong><br />
All trademarks and logos are the property of their respective owners.<br />
Logo designs in their current format are licensed to Michael John Grove under the <a href="http://creativecommons.org/licenses/by/2.5/za/">Creative Commons Attribution 2.5 South Africa License. </a><br />
Should you be the owner of the original logo and wish your logo to be removed please <a href="http://darwinshome.za.net/contact">contact me</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2008/03/social-networking-images-and-links/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2008/03/social-networking-images-and-links/</feedburner:origLink></item>
		<item>
		<title>JavaScript / XML based Country, State Selection Script</title>
		<link>http://feedproxy.google.com/~r/OneDevelopersGuideToSanity/~3/J5iIcDBv3n4/</link>
		<comments>http://www.darwinshome.za.net/blog/2008/03/javascript-xml-based-country-state-selection-script/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 20:42:32 +0000</pubDate>
		<dc:creator>Michael John Grove</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.darwinshome.za.net/blog/2008/03/02/javascript-xml-based-country-state-selection-script/</guid>
		<description><![CDATA[UPDATE 26 January 2009: Fixed the XML file load Bug that was affecting Chrome and Safari
Making use of my XML based Country and State/Province file I have put together a small script to populate two drop down lists with the complete Country and the selected countries Province or State list.
The code is ALL client-side based, [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://darwinshome.za.net/uploads/demo_xml.gif" alt="JavaScript Country Selection list" /><strong>UPDATE 26 January 2009: Fixed the XML file load Bug that was affecting Chrome and Safari</strong></p>
<p>Making use of my <a href="http://www.darwinshome.za.net/blog/2008/02/08/country-selection-list-with-sate-and-province/">XML based Country and State/Province file</a> I have put together a small script to populate two drop down lists with the complete Country and the selected countries Province or State list.</p>
<p>The code is ALL client-side based, so it will suffer from browsers without JavaScript enabled, but it is a very fast and light weight script to use if you want to quickly add a Country and State selection box to your registration forms. This script does not require any database to function. </p>
<p><a href="http://www.darwinshome.za.net/demo/xmlworld/">Demo page</a><br />
<a class="downloadlink" href="http://www.darwinshome.za.net/blog/download/1" title="Version2.2 downloaded 207 times" >Download Country/State Code (207)</a></p>
<p><span id="more-35"></span><br />
<strong>Code Explanation:</strong><br />
The initial XML Parser 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>window.<span style="color: #660066;">ActiveXObject</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    xmlDoc <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Microsoft.XMLDOM&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlDoc.<span style="color: #660066;">async</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    xmlDoc.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country_state.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">implementation</span> <span style="color: #339933;">&amp;&amp;</span> 
document.<span style="color: #660066;">implementation</span>.<span style="color: #660066;">createDocument</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> xmlhttp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> window.<span style="color: #660066;">XMLHttpRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlhttp.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;country_state.xml&quot;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlhttp.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlDoc <span style="color: #339933;">=</span> xmlhttp.<span style="color: #660066;">responseXML</span>.<span style="color: #660066;">documentElement</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
xmlDoc.<span style="color: #660066;">async</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
xmlDoc.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country_state.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Internet Explorer has had a built in XML parser since version 5, but this parser opens XML files differently to other browsers (Firefox, Opera, etc), so to load an XML file you need to first check which browser is running on the client, For IE:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">ActiveXObject</span></pre></div></div>

<p>and a double check for other browsers:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">document.<span style="color: #660066;">implementation</span> <span style="color: #339933;">&amp;&amp;</span> 
document.<span style="color: #660066;">implementation</span>.<span style="color: #660066;">createDocument</span></pre></div></div>

<p>If IE exists, create an empty Microsoft XML document object:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">xmlDoc <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Microsoft.XMLDOM&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
xmlDoc.<span style="color: #660066;">async</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    xmlDoc.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country_state.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Or for Other browsers:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #003366; font-weight: bold;">var</span> xmlhttp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> window.<span style="color: #660066;">XMLHttpRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlhttp.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;country_state.xml&quot;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlhttp.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlDoc <span style="color: #339933;">=</span> xmlhttp.<span style="color: #660066;">responseXML</span>.<span style="color: #660066;">documentElement</span><span style="color: #339933;">;</span></pre></div></div>

<p>Once the browser check is done it loads the XML document, from here on the code works the same in IE as in other browsers.</p>
<p>On a side note, there is an easy way to test that your XML file has been loaded correctly during development. Just add the document.write or alert function to return the number of nodes in the XML file (in my country_state XML example I would return the number of &lt;country&gt; nodes - with the expected result being 252):</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Once the XML file has loaded correctly, you can perform functions using the file. The next part of my code calls the <strong>fillCountryList()</strong> function that populates the first select box. I call the <strong>fillCountryList()</strong>  function in my <strong>onload()</strong> event handler:<br />
HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;body onload=&quot;fillCountryList();&quot;&gt;</pre></div></div>

<p>JavaScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> fillCountryList <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> countryList <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cboCountry&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> countryList.<span style="color: #660066;">options</span>.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> x <span style="color: #339933;">&gt;-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> x<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        countryList.<span style="color: #660066;">options</span><span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #003366; font-weight: bold;">var</span> countryNames <span style="color: #339933;">=</span> xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> numberOfCountries <span style="color: #339933;">=</span> countryNames.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;=</span>numberOfCountries<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> currentCountry <span style="color: #339933;">=</span>  countryNames<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fillList<span style="color: #009900;">&#40;</span>countryList<span style="color: #339933;">,</span>currentCountry<span style="color: #339933;">,</span>currentCountry<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The <strong>fillCountryList()</strong> function identifies the first selection box with the specified ID (in my example cboCountry), the function then clears all current entries in the selection box. Clearing entries is good way to prevent duplicate information from being in your selection list prior to processing. On another side note, having VALID data in your selection box is an excellent way to still have your web page form display correctly if JavaScript is disabled on the client; this data can act as an alternative to the JavaScript data; an example of alternative data for the country selection box is listed.<br />
Alternative HTML example:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;select id=&quot;cboCountry&quot; onchange=&quot;fillStateList();&quot;&gt;
        &lt;option value=&quot;&quot;&gt;Select a Country&lt;/option&gt;
        &lt;option value=&quot;1&quot;&gt;South Africa&lt;/option&gt;
        &lt;option value=&quot;2&quot;&gt;USA&lt;/option&gt;
        &lt;option value=&quot;3&quot;&gt;UK&lt;/option&gt;
        &lt;option value=&quot;4&quot;&gt;Other&lt;/option&gt;
&lt;/select&gt;</pre></div></div>

<p>The above code example is NOT a requirement, and my current example does not have any alternative data, but it can help your website to degrade well under different client environments.</p>
<p>The next part of the <strong>fillCountryList()</strong> function is getting the country names from loaded XML file:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> countryNames <span style="color: #339933;">=</span> xmlDoc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will return an object collection for all nodes with the &lt;country&gt; tag to an array in the <strong>countryNames</strong> variable. A loop then processes the array and adds each country to the cboCountry select box using the <strong>fillList()</strong> function.</p>
<p>The state select box is only populated once a new country has been selected using the <strong>onChange</strong> event handler. Note: you should also be able to use the <strong>onClick</strong> event handler rather than the <strong>onChange</strong> event handler.</p>
<p>The <strong>fillStateList()</strong> function populates the States in the same way as the <strong>fillCountryList()</strong>  function does, but first gets the selected countries array ID out of the country array before looping through THAT countries State/Province array therby filling the cboState select box with valid states.</p>
<p>Hopefully this code and explanation will assist beginners and experts alike. Download and enjoy.</p>
<p>This script has been tested under Firefox, Opera, and Internet Explorer 6 &amp; Internet Explorer 7, Google Chrome and Safari 3.<br />
<del datetime="2009-01-26T19:35:46+00:00"><em>Currently NOT working in Safari. Safari processes the &#8220;document. getElementsByTagName&#8221; function differently to other browsers,  I will find a fix and release an updated version of the script soon.</em></del><br />
 <strong>UPDATE 26 January 2009: Fixed XML file load for Chrome and Safari</strong> :- Please drop me a line if you find any bugs that I may have missed.</p>
<p>Questions and comments are welcome.</p>
<p><a href="http://www.darwinshome.za.net/demo/xmlworld/">Demo page</a><br />
<a class="downloadlink" href="http://www.darwinshome.za.net/blog/download/1" title="Version2.2 downloaded 207 times" >Download Country/State Code (207)</a></p>
<p>License: <a rel="license" href="http://creativecommons.org/licenses/by/2.5/za/">Creative Commons Attribution 2.5 South Africa License</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darwinshome.za.net/blog/2008/03/javascript-xml-based-country-state-selection-script/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.darwinshome.za.net/blog/2008/03/javascript-xml-based-country-state-selection-script/</feedburner:origLink></item>
	</channel>
</rss>
