<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1881619893792778188</id><updated>2011-12-10T08:24:23.128+13:00</updated><category term='barcamp'/><category term='templates'/><category term='tools'/><category term='javascript'/><category term='news'/><category term='bugs'/><category term='lists'/><category term='blender'/><category term='printing'/><category term='christchurch'/><category term='not code'/><category term='no-www'/><category term='chrome'/><category term='presentation'/><category term='accessibility'/><category term='not-code'/><category term='css'/><category term='braille strip'/><category term='affiliate'/><category term='start ups'/><category term='internet'/><category term='forms'/><category term='video'/><category term='layout'/><category term='productivity'/><category term='progressive enhancement'/><category term='JSON'/><category term='usability'/><category term='entrepreneurs'/><category term='xml'/><category term='fibre network'/><category term='user experience'/><category term='rule of thirds'/><category term='jQuery'/><category term='mysql'/><category term='screen readers'/><category term='blog admin'/><category term='php'/><category term='ajax'/><category term='security'/><category term='menus'/><category term='WordPress'/><category term='broadband'/><category term='google mail'/><category term='web services'/><category term='overrides'/><category term='seo'/><category term='GAotD'/><category term='Firefox'/><category term='blogger'/><category term='paypal'/><category term='correction'/><category term='websites'/><category term='software'/><category term='html'/><category term='shout out'/><category term='mod_rewrite'/><category term='how real people behave'/><category term='accessability'/><category term='design'/><category term='regular expressions'/><category term='htaccess'/><category term='co-working spaces'/><category term='fibre from the farm'/><category term='gmail'/><category term='web browsers'/><title type='text'>What I learnt today</title><subtitle type='html'>A record of problems I have encountered and overcome, usually in the realms of html/css/php/mysql where I work and play.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>74</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6369945996122985462</id><published>2011-12-10T08:16:00.004+13:00</published><updated>2011-12-10T08:24:23.138+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='user experience'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Quick UI tip re radio buttons</title><content type='html'>If you have optional information collected via a set of radio buttons you may consider having none selected by default. But if the record is going to be editable at a later date you're going to need an N/A or similar option, even if you just leave the "value" attribute blank because once the user starts clicking (or tabs) into the options one of them must always be checked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6369945996122985462?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6369945996122985462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6369945996122985462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6369945996122985462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6369945996122985462'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/12/quick-ui-tip-re-radio-buttons.html' title='Quick UI tip re radio buttons'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8460286774725509406</id><published>2011-11-14T20:13:00.000+13:00</published><updated>2011-11-14T20:14:47.360+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='christchurch'/><category scheme='http://www.blogger.com/atom/ns#' term='co-working spaces'/><title type='text'>Co-working space setting up in Christchurch?</title><content type='html'>BizDojo runs co-working spaces in Wellington and Auckland. I have a couple of tabs open to articles which mention they are looking at setting up shop in Chch.&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/small-business/news/article.cfm?c_id=85&amp;amp;objectid=10764278" target="_blank" title="NZ Herald"&gt;Creativity flows in right space&lt;/a&gt;&lt;br /&gt;&lt;a href="http://idealog.co.nz/magazine/36/working-out" target="_blank" title="Idealog"&gt;Coworking 2.0 gains traction down under&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is relevant because I have no idea what the status of Epicentre and Effusion are post-quake, but both sites were the Red Zone and at least one has been demolished.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8460286774725509406?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8460286774725509406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8460286774725509406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8460286774725509406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8460286774725509406'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/11/co-working-space-setting-up-in.html' title='Co-working space setting up in Christchurch?'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-2596446264755820750</id><published>2011-10-17T09:34:00.004+13:00</published><updated>2011-10-17T09:57:55.425+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='productivity'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><category scheme='http://www.blogger.com/atom/ns#' term='affiliate'/><title type='text'>Managing multiple monitors in Windows 7</title><content type='html'>Only recently did I attach a second monitor* to my Windows 7 box, and set about trying to configure it with multiple wallpapers. Unfortunately this doesn't seem to be supported natively :( Luckily an acquaintance pointed me at &lt;a href="http://www.displayfusion.com?refid=712026" title="displayfusion.com" target="_blank"&gt;Display Fusion&lt;/a&gt; (disclaimer: affiliate link).&lt;br /&gt;&lt;br /&gt;Being an earning and responsible developer I opted to pay for the application after the 30 day trial license expired, although I don't actually use any functions that aren't available in the free version (multiple wallpapers, hotkeys to move windows between monitors). Still one day I might want to customise those hotkeys, or one of the may other functions yet unexplored.&lt;br /&gt;&lt;br /&gt;*I admit, mostly so I can watch fullscreen video while still keeping an eye on what is happening online. But it has improved my productivity and reducing the amount of alt-tabbing I do has to be better for my wrists.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-2596446264755820750?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/2596446264755820750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=2596446264755820750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2596446264755820750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2596446264755820750'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/10/managing-multiple-monitors-in-windows-7.html' title='Managing multiple monitors in Windows 7'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-797564423281139078</id><published>2011-07-22T13:01:00.003+12:00</published><updated>2011-07-22T13:15:05.815+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='not-code'/><title type='text'>fckeditor file browser not sending proper xml response</title><content type='html'>A site I help maintain suddenly stopped letting the client link to files using fckeditor, alerting that "The server didn't send back a proper XML response" when the file browser was opened. &lt;br /&gt;&lt;br /&gt;This is one of the rare occasions Internet Explorer returns a more helpful error message than Firefox - it included the information that the XML request error (actually the http response code) was OK (200).&lt;br /&gt;&lt;br /&gt;After initially checking such thing as server settings and response-type/encoding headers I set to perusing the actual returned xml in Firebug and spotted a suspicious looking square where there should have been a regular character. Turns out the client had uploaded a file containing a character which must not exist in utf-8 - specifically an em-dash ( &amp;mdashl )). The xml lists filenames as attributes of "file" nodes, so the browser was getting to this character, failing to recognise it, and declaring the XML response invalid.&lt;br /&gt;&lt;br /&gt;Changing the filename resolved the problem. I didn't encounter this possibility described elsewhere while I was googling, so here it is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-797564423281139078?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/797564423281139078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=797564423281139078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/797564423281139078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/797564423281139078'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/07/fckeditor-file-browser-not-sending.html' title='fckeditor file browser not sending proper xml response'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8037559639922344640</id><published>2011-06-25T09:53:00.004+12:00</published><updated>2011-06-25T10:42:56.732+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='progressive enhancement'/><category scheme='http://www.blogger.com/atom/ns#' term='layout'/><category scheme='http://www.blogger.com/atom/ns#' term='menus'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='lists'/><title type='text'>Even up a horizontal menu with javascript</title><content type='html'>Often I receive a design which calls for some arbitrary number of menu items to be spread across a horizontal navigation menu not evenly, but each with the same amount of padding between the text and the divider on each side.&lt;br /&gt;Simple text representation:&lt;br /&gt;|  text  |  longer text  |  mid-text  |  t  |&lt;br /&gt;&lt;br /&gt;Padding is easy, it goes on the link. Nominally you then just adjust it as necessary once you know what the final text items are. (I usually assign any extra space to li:first-child a );&lt;br /&gt;&lt;br /&gt;Unfortunately different browsers will&lt;br /&gt;- display the same font slightly wider&lt;br /&gt;- calculate/render elements with slightly different widths&lt;br /&gt;&lt;br /&gt;Which means your perfectly calculated style will either fall short or push the last menu item over the edge.&lt;br /&gt;&lt;br /&gt;My solution is to initially set the padding fairly small, and then expand it on page load with a little javascript. This is progressive - the site is still perfectly usable if you don't have javascript turned on, it may just look a little lopsided.&lt;br /&gt;&lt;br /&gt;Basic navigation structure&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div id="navigation"&amp;gt;&lt;br /&gt; &amp;lt;ul id="menu"&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt; href=""&amp;gt;text&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt; href=""&amp;gt;longer text&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt; href=""&amp;gt;med-text&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt; href=""&amp;gt;t&amp;lt;/li&amp;gt;&lt;br /&gt; &amp;lt;/ul&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Basic styling&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;#navigation { width: 980px; }&lt;br /&gt;#navigation * { margin: 0; padding: 0}&lt;br /&gt;#navigation li {float: left; list-style-type: none;}&lt;br /&gt;#navigation a { padding: 0 10px; }&lt;br /&gt;/* if you do end up with a spare px through rendering this next rule makes sure the RHS&lt;br /&gt; of your menu sits pretty.&lt;br /&gt; .ie-last is added to older versions of IE using &lt;a href="http://webknight-nz.blogspot.com/2011/03/ie-9-detection-with-jquery.html"&gt;feature detection&lt;/a&gt;*/&lt;br /&gt;#navigation li:last-child, #navigation li.ie-last { float: right; }&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The javscript (jQuery)&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;$(document).ready(function(){&lt;br /&gt; //distribute menu items to fit page width&lt;br /&gt;&lt;br /&gt; cont_width = $('#navigation').innerWidth(); //container width&lt;br /&gt; var nav_width = 0; //space taken up by items as rendered&lt;br /&gt; menu_items = $('#menu &amp;gt; li');&lt;br /&gt; $(menu_items).each(function(){&lt;br /&gt;   nav_width += $(this).outerWidth();&lt;br /&gt; });&lt;br /&gt; space = cont_width - nav_width;&lt;br /&gt; &lt;br /&gt; if(space&amp;gt;0){&lt;br /&gt;   //relies on default padding being set up correctly in the stylesheet&lt;br /&gt;&lt;br /&gt;   link_padding = parseInt($(menu_items).first().children('a').first('a').css('paddingRight'));&lt;br /&gt;   num_items = menu_items.length&lt;br /&gt;   widen_each = space/num_items; //float&lt;br /&gt;&lt;br /&gt;   while(widen_each&amp;gt;=1){&lt;br /&gt;     //expand all items&lt;br /&gt;&lt;br /&gt;     each_side = widen_each/2;&lt;br /&gt;     each_side = Math.floor(each_side);&lt;br /&gt;     if(each_side&amp;gt;=1){ // ie widen_each &amp;gt;= 2, add to both sides equally&lt;br /&gt;       link_padding += each_side;&lt;br /&gt;       widen_each -= each_side*2;&lt;br /&gt;       space -= each_side*2*num_items;&lt;br /&gt;       $(menu_items).children('a').css({'paddingLeft':link_padding,'paddingRight':link_padding});&lt;br /&gt;     } else { // ie 1 &amp;lt;= widen_each &amp;lt; 2, add 1 to the right&lt;br /&gt;       widen_each -= 1;&lt;br /&gt;       space -= num_items;&lt;br /&gt;       $(menu_items).children('a').css({'paddingRight':link_padding+1});&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   if(widen_each&amp;gt;0){ // some amount of space cannot be evenly distributed as whole px&lt;br /&gt;     //expand last item to take up any remaining space&lt;br /&gt;     last_item = $(menu_items).last();&lt;br /&gt;     while(space&amp;gt;1){ //in the browsers that are causing trouble we need to leave a px free.&lt;br /&gt;       each_side = space/2;&lt;br /&gt;       each_side = Math.floor(each_side);&lt;br /&gt;&lt;br /&gt;       if(each_side&amp;gt;=1){&lt;br /&gt;         link_padding += each_side;&lt;br /&gt;         space -= each_side*2;&lt;br /&gt;         $(last_item).children('a').css({'paddingLeft':link_padding,'paddingRight':link_padding});&lt;br /&gt;       } else {&lt;br /&gt;         space -= 1;&lt;br /&gt;         $(last_item).children('a').css({'paddingRight':link_padding+1});&lt;br /&gt;       }&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;);&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;~~~&lt;br /&gt;A pure CSS approach is to use display:table-cell (see this &lt;a href="http://www.sitepoint.com/give-floats-the-flick-in-css-layouts/" target="_blank" title="Give floats the flick in CSS layouts"&gt;article at SitePoint&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8037559639922344640?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8037559639922344640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8037559639922344640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8037559639922344640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8037559639922344640'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/06/even-up-horizontal-menu-with-javascript.html' title='Even up a horizontal menu with javascript'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6670246987313389291</id><published>2011-05-24T12:09:00.002+12:00</published><updated>2011-05-24T12:12:53.580+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='christchurch'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre network'/><title type='text'>Who is building the new Ultra Fast Broadband network for Christchurch?</title><content type='html'>Not Telecom (well Chorus). The get much of much of the country, but they don't get Christchurch!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.enablenetworks.co.nz/" target="_blank"&gt;Enable Networks&lt;/a&gt; get Christchurch and Rangiora and outlying settlements. Enable are owned by the Christchurch City Council (ie publicly owned) and they've been building a dark fibre network in Christchurch for a while now.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;amp;objectid=10725124" target="_blank" title="Telecom wins big in Govt fibre deal"&gt;Herald story covering all areas&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.voxy.co.nz/politics/world-beating-ultra-fast-broadband-christchurch/5/90656" target="_blank" title="World-Beating Ultra Fast Broadband For Christchurch"&gt;More&lt;/a&gt; and &lt;a href="Enable Delighted To Be Building Christchurch UFB Network" target="_blank" title="Enable Delighted To Be Building Christchurch UFB Network"&gt;More&lt;/a&gt; - media releases on Voxy about Christchurch + Enable.&lt;br /&gt;&lt;br /&gt;~~~&lt;br /&gt;I'll be watching the Telecom/Chorus split with some interest - assuming the shareholder vote is just a formality will Chorus (&lt;a href="http://www.nzherald.co.nz/business/news/article.cfm?c_id=3&amp;amp;objectid=10727695" title="Telecom split hangs on law change, shareholder vote, Reynolds tells staff" target="_blank"&gt;to become C2&lt;/a&gt;) be a listed company, adding a fraction of desperately needed depth to our stock market?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6670246987313389291?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6670246987313389291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6670246987313389291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6670246987313389291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6670246987313389291'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/05/who-is-building-new-ultra-fast.html' title='Who is building the new Ultra Fast Broadband network for Christchurch?'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6547681688273763290</id><published>2011-05-04T15:36:00.005+12:00</published><updated>2011-05-04T15:49:23.307+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='WordPress'/><title type='text'>Stop WordPress index.php redirecting</title><content type='html'>Wordpress is very determined that if you try to access http://[domain]/index.php without specifying more information in the query string that you should be redirected to the domain root ie http://[domain name]/.&lt;br /&gt;&lt;br /&gt;This is problematic if you happen to have a static placeholder (eg index.html) or similar there to keep visitors at bay while developing the site, or if you are copying your old static site to Wordpress but want to leave the old files running until you're done. You simply can't preview your new homepage.&lt;br /&gt;&lt;br /&gt;After poking at some of the other results you've probably seen if you came here from search, all of which either didn't work with the latest version or while freeing up the index page started redirecting the internal pages instead, I came up with this bit of code which I just stuck at the top of "functions.php" in the theme directory.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;/**&lt;br /&gt; * turn off the goddam canonical redirect for development&lt;br /&gt;*/&lt;br /&gt;if(!is_page()&amp;&amp;!is_single())&lt;br /&gt;{&lt;br /&gt;remove_filter('template_redirect','redirect_canonical');&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;It worked in this instance, but so much seems tied into the url redirection in Wordpress that I wouldn't trust it not to have broken something, somewhere. So it needs to be removed once the site is live.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6547681688273763290?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6547681688273763290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6547681688273763290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6547681688273763290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6547681688273763290'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/05/stop-wordpress-indexphp-redirecting.html' title='Stop WordPress index.php redirecting'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6954811338836178480</id><published>2011-04-25T10:47:00.004+12:00</published><updated>2011-04-25T10:52:25.630+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre from the farm'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre network'/><title type='text'>"The modern No 8 wire is data"</title><content type='html'>The NZ Herald has a piece on some ways the internet and other information technologies are allowing farmers to accelerate and  fine tune their response to the market.&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;amp;objectid=10721371" target="_blank" title="NZ Herald"&gt;Connecting the clever farm&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space:normal"&gt;From an armchair in South Canterbury, he can follow a wool auction in Melbourne via satellite and track the prices other growers are getting for their lots.&lt;br /&gt;...&lt;br /&gt;"If we think the market is where we want it, I send an email through to the selling company and off we go."&lt;br /&gt;This level of connectivity and the ability of farmers to access real-time information is becoming the lifeblood of agriculture in the 21st century.&lt;br /&gt;...&lt;br /&gt;"The modern No 8 wire is data and how it can be converted into meaningful information, how it can be twisted and bent and used," Walker said.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Donald Aubrey who is the main speaker in the article is Vice President of Federated Farmers, and a quick google on his name will turn up some of the other things he has to say on the matter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6954811338836178480?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6954811338836178480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6954811338836178480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6954811338836178480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6954811338836178480'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/04/modern-no-8-wire-is-data.html' title='&quot;The modern No 8 wire is data&quot;'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-4782875939919539656</id><published>2011-04-16T10:47:00.001+12:00</published><updated>2011-04-16T10:49:35.094+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='user experience'/><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='how real people behave'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><title type='text'>Checkout design: Really excellent article</title><content type='html'>&lt;a href="http://www.smashingmagazine.com/2011/04/06/fundamental-guidelines-of-e-commerce-checkout-design/"&gt;http://www.smashingmagazine.com/2011/04/06/fundamental-guidelines-of-e-commerce-checkout-design/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Two posts (if trivial) in one day. Gosh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-4782875939919539656?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/4782875939919539656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=4782875939919539656' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4782875939919539656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4782875939919539656'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/04/checkout-design-really-excellent.html' title='Checkout design: Really excellent article'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-3573495387408867210</id><published>2011-04-16T10:23:00.005+12:00</published><updated>2011-04-16T10:47:10.493+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurs'/><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre network'/><title type='text'>Backgrounder on the men behind Pacific Fibre</title><content type='html'>&lt;a href="http://idealog.co.nz/magazine/32/cable-guys" target="_blank"&gt;http://idealog.co.nz/magazine/32/cable-guys&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space: normal"&gt;Put these six gentlemen in a room and tell them to invent a company, and you’d expect some pretty fantastic ideas. They’ve spent their careers with internet startups, biotech research, brand-building, marketing and advertising, mobile development, and the like, and they’re used to success.&lt;br /&gt;&lt;br /&gt;But this time they’re doing something that’s both more prosaic and much grander. They’ve co-founded a company that they expect to revolutionise New Zealand business and society with a product that, even to its customers, will be invisible—literally.&lt;br /&gt;&lt;br /&gt;Their startup, Pacific Fibre, plans to lay submarine fibre-optic cables linking New Zealand, Australia and the US—where about 85 percent of the internet data New Zealanders consume originates from.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-3573495387408867210?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/3573495387408867210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=3573495387408867210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3573495387408867210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3573495387408867210'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/04/backgrounder-on-men-behind-pacific.html' title='Backgrounder on the men behind Pacific Fibre'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1917560329397495223</id><published>2011-03-19T08:53:00.007+13:00</published><updated>2011-06-25T10:51:28.273+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>IE 9 detection with jQuery</title><content type='html'>For quite a while I've been using &lt;a href="http://api.jquery.com/jQuery.support/" target="_blank" title="jQuery support object"&gt;jQuery and feature detection&lt;/a&gt; to add styling elements to Internet Explorer 8 and earlier on load, especially for rounded corners. The particular feature I settled on for this was &lt;em&gt;htmlserialize&lt;/em&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$(document).ready(function()&lt;br /&gt;{&lt;br /&gt;//IE rounded corners&lt;br /&gt;if(!$.support.htmlserialize) // IE feature detection&lt;br /&gt;{&lt;br /&gt;struct = '&amp;lt;span class="ie-tl"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="ie-tr"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="ie-br"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class="ie-bl"&amp;gt;&amp;lt;/span&amp;gt;';&lt;br /&gt;$('div.corners').append(struct);&lt;br /&gt;&lt;br /&gt;//compensate for irregular first-child/last-child support&lt;br /&gt;$('li:first-child').addClass('ie-first');$('li:last-child').addClass('ie-last');&lt;br /&gt;} //end IE detection&lt;br /&gt;}); //end ready&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Internet Explorer 9 handles CSS3 making this generally unnecessary for visitors using the browser. More importantly IE9 has it's own new set of rendering differences compared to earlier versions which need to be accounted for as long as IE8 (and IE7) are still out there.&lt;br /&gt;The feature I've found works to target IE9 is &lt;em&gt;opacity&lt;/em&gt;, most generally I use it to &lt;i&gt;exclude&lt;/i&gt; the browser, as in&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if(!$.support.htmlSerialize &amp;&amp; !$.support.opacity) &lt;br /&gt;{&lt;br /&gt;// IE6/7/8 code&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1917560329397495223?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1917560329397495223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1917560329397495223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1917560329397495223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1917560329397495223'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2011/03/ie-9-detection-with-jquery.html' title='IE 9 detection with jQuery'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-4625312922667943022</id><published>2010-11-28T17:28:00.004+13:00</published><updated>2010-11-28T17:43:51.828+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='websites'/><title type='text'>Site rebuild</title><content type='html'>I just complete the rebuild of my main site that I've been working on intermittently. This was brought on by the fact that I built it while I was hunting for work, and was never comfortable with what I was trying to do with it.&lt;br /&gt;&lt;br /&gt;So now it's pretty minimalist. And pretty ugly in IE, because I've made quite a lot of use of CSS3 for rounding corners and styling list items. But it has&lt;ul&gt;&lt;li&gt;progressive enhancement instead of inline javascript or the target attribute on links&lt;/li&gt;&lt;li&gt;a Skip Navigation link and access keys, which I don't usually get to include in client work :(&lt;/li&gt;&lt;li&gt;conditional comments to let IE users know what is going on, with one especially for IE6 users&lt;/li&gt;&lt;/ul&gt;There are some other enhancements I plan to add to it - a few more images, a few more details and relevant links about my interests, basically making it really my website instead of a poor excuse for an advertisement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-4625312922667943022?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/4625312922667943022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=4625312922667943022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4625312922667943022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4625312922667943022'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/11/site-rebuild.html' title='Site rebuild'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5982471578872888936</id><published>2010-09-21T14:11:00.003+12:00</published><updated>2010-09-21T14:17:41.385+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre from the farm'/><title type='text'>Rural broadband</title><content type='html'>Saturday in the Herald &lt;a href="http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10674273" target="_blank"&gt;Farmers connect with Kiwi ingenuity&lt;/a&gt; talks about how farmers are going about getting broadband to their properties, and how it's improving their production.&lt;br /&gt;&lt;blockquote style="white-space: normal;"&gt;For Ken Marshall, it was because he wanted to give his partner the best birthday present. Warren McNabb needed it to run his vineyard and home office. Liz Udy wanted to become a midwife. And Richard Wilson's high-tech milking shed wouldn't work without it.&lt;br /&gt;&lt;br /&gt;They're all talking about requiring fast broadband. Yet all these farmers were in places - Hastwell, Mangamaire, the Awatere Valley and Hinds - that made the prospect as remote as their location.&lt;br /&gt;&lt;br /&gt;Extraordinary, then, that they all now enjoy fibre-optic cable to their doors and unimaginable broadband speeds - 100 megabits per second (Mbps) - that townies can only dream of. The national average is around 3Mbps.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5982471578872888936?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5982471578872888936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5982471578872888936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5982471578872888936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5982471578872888936'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/09/rural-broadband.html' title='Rural broadband'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7418733206640940348</id><published>2010-09-13T12:09:00.003+12:00</published><updated>2010-09-13T12:28:43.716+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><title type='text'>Businesses making it with broadband</title><content type='html'>The NZ Herald has a series on how high speed internet can enable new ways of running a business, and bring international developments to New Zealand&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10672380"&gt;What's the point of faster broadband? Here's what&lt;/a&gt; (Introduction)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10672382"&gt;Eye on the sky: Awarua Station&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space:normal"&gt;&lt;br /&gt;In the depths of Southland, a small facility is helping unmanned European Space Agency missions take supplies to the International Space Station. Part of the facility's essential infrastructure is a wireless broadband connection.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10672390"&gt;Found in translation: Tras@ction&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space:normal"&gt;Mackie's business, Trans@ction, which he'd started in 1990 in Surrey, outside London, depended on internet access. From the outset, the business used contract translators in New Zealand, who would take advantage of the time difference for overnight delivery of work to British and European customers.&lt;br /&gt;The company is small, but in translating millions of words a year over a couple of decades has put millions of dollars into the New Zealand economy, Mackie says.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10672391"&gt;In the long run: Marathon Photos&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space:normal"&gt;Until an optical fibre connection became available, Kay says the company relied on a "frustratingly slow" ADSL connection of the type most residential broadband subscribers have.&lt;br /&gt;That meant photos taken on a Sunday weren't available online until Wednesday. With fibre, the 230,000 images from Sydney's City2Surf event on August 8 were online the following morning.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10672389"&gt;Online wine: La Vinotheque&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space:normal"&gt;How about using it to keep tabs on a business on a smallish island in the Pacific Ocean? The real question might be, if you run a string of wine shops in Noumea, as does Dominique Annonier, why would you ever want to leave your New Caledonian paradise?&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10672383"&gt;Business without walls: Voco&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="white-space:normal"&gt;"Every time we've lurched to another level and reconsidered whether we need premises, it has seemed too much like spending money on a place for people to go and do nothing," Foley says. "Our folk are most productive when they're with clients."&lt;br /&gt;Voco specialises in helping customers merge their computing and telecommunications, and has drawn on its own expertise to build a network of consultants who work from home offices.&lt;br /&gt;...&lt;br /&gt;"We spend money on stuff that coalesces the team rather than on the hard trappings of traditional corporate business."&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7418733206640940348?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7418733206640940348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7418733206640940348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7418733206640940348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7418733206640940348'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/09/businesses-making-it-with-broadband.html' title='Businesses making it with broadband'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-2591151791933507391</id><published>2010-08-29T10:56:00.007+12:00</published><updated>2010-08-29T11:43:14.811+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><title type='text'>Repopulating a form after client-side validation using javascript and JSON</title><content type='html'>More properly, how to repopulate a form after client-side validation has failed, in particular when you are not directly writing the form code. &lt;br /&gt;&lt;br /&gt;In this case the form is created through a WYSIWYG interface (by a 3rd party). The available tools are cookies (for passing the data back from the validation script) and javascript (which can be entered in the 'Source' view of the WYSIWYG editor and is permitted by the CMS).&lt;br /&gt;&lt;br /&gt;For a few fields it is easy enough to give each field it's own cookie or use a simple join/spilt scheme, but for longer forms (more than about 10 fields) this gets unwieldy very fast, and you start to run into the cookie limit.&lt;br /&gt;&lt;br /&gt;Enter JSON, to tidily package all your field-data pairs in a way that javascript can natively interpret.&lt;br /&gt;&lt;br /&gt;Step 1.&lt;br /&gt;Construct the JSON string as part of your validation script (this in php)&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt; // my whitelist is ('var_in_script'=&gt;'form-field-name') so I can't just json_encode it. &lt;br /&gt;$json = '{';&lt;br /&gt;foreach($whitelist as $f =&gt; $v)&lt;br /&gt;{&lt;br /&gt; $n = str_replace('-','_',$v); //valid js variable names , form names are constructed with hyphens&lt;br /&gt; $x = html_entity_decode($$f,ENT_QUOTES); // undo input cleaning&lt;br /&gt; $x = str_replace('"',"'",$x); // or escape as '\"'&lt;br /&gt; $json .= '"'.$n.'":"'.$x.'",';&lt;br /&gt;}&lt;br /&gt;$json = rtrim($json,',').'}'; &lt;br /&gt;setcookie('membershipformJson',$json,time()+30);&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Step 2.&lt;br /&gt;Put this function (and &lt;a href="http://www.quirksmode.org/js/cookies.html" target="_blank" rel="external"&gt;ancillary cookie handling functions&lt;/a&gt;) in the global javascript if possible, or at the top of the WYSIWYG source otherwise.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;function refillFormAdv(x)&lt;br /&gt;{&lt;br /&gt;  // x is the id of the form&lt;br /&gt;  fields = document.forms[x].elements;&lt;br /&gt;&lt;br /&gt;  // is the cookie set?&lt;br /&gt;  j = readCookie(x+'formJson');&lt;br /&gt;  if(!j)&lt;br /&gt;  {&lt;br /&gt;    return;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  v = eval("("+URLDecode(j)+")"); // extract values&lt;br /&gt;&lt;br /&gt;  for(i in fields)&lt;br /&gt;  {&lt;br /&gt;    f = fields[i];&lt;br /&gt;    id = f.id;&lt;br /&gt;&lt;br /&gt;    if(id) &lt;br /&gt;    {&lt;br /&gt;      id = id.replace(/-/g,'_'); // convert to valid var name&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;      continue;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    //look for the var in the JSON data&lt;br /&gt;    z=eval('v.' + id); &lt;br /&gt;    if(z)&lt;br /&gt;    {&lt;br /&gt;      t = f.type;&lt;br /&gt;      switch(t)&lt;br /&gt;      {&lt;br /&gt;        case "text":&lt;br /&gt;        case 'textarea':&lt;br /&gt;         f.value = z;&lt;br /&gt;         break;&lt;br /&gt;    &lt;br /&gt;        case 'checkbox':&lt;br /&gt;        f.checked = true;&lt;br /&gt;        break;&lt;br /&gt;    &lt;br /&gt;        case 'select-one':&lt;br /&gt;         for(o in f.options)&lt;br /&gt;         { &lt;br /&gt;          if(f.options[o].value == z)&lt;br /&gt;          { &lt;br /&gt;            f.options[o].selected=true; &lt;br /&gt;          }&lt;br /&gt;         }&lt;br /&gt;         break;&lt;br /&gt;       // add  other element types later if needed&lt;br /&gt;       // radio buttons are going to be more difficult&lt;br /&gt;       // will need to alter the script to look for name instead of id&lt;br /&gt;&lt;br /&gt;       default: &lt;br /&gt;         break;&lt;br /&gt;     }// end switch&lt;br /&gt;    }// end if&lt;br /&gt;  }// end while&lt;br /&gt;&lt;br /&gt;  //clean up&lt;br /&gt;  eraseCookie(x+'formJson');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function URLDecode(v)&lt;br /&gt;{&lt;br /&gt;  v = unescape(v);&lt;br /&gt;  while(v.indexOf('+')&gt;-1){  v = v.replace("+"," "); }&lt;br /&gt;  return v;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Step 3. Make sure your form has an id (in the code above the id is 'membership') and that all fields have an id matching their name. (This highlights the one as yet unaddressed problem with the script - a set of radio buttons can not all have the same ID. I would address this by extending the function to check the "name" attribute if a matching "id" is not found, then comparing the "value" of each matching element against z. )&lt;br /&gt;&lt;br /&gt;Step 4. Include the function call immediately after the form. If possible set it to fire after the page has loaded (at this point I was really wishing the system supported jQuery or any javascript framework).&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;  refillFormAdv('membership');&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-2591151791933507391?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/2591151791933507391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=2591151791933507391' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2591151791933507391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2591151791933507391'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/08/repopulating-form-after-client-side.html' title='Repopulating a form after client-side validation using javascript and JSON'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-4133648187680949163</id><published>2010-07-14T14:03:00.002+12:00</published><updated>2010-07-14T14:31:17.733+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>overflow:hidden breaks printing</title><content type='html'>As we know elements which contain only floated elements often have no dimensions of their own (or dimensions of 0 if you prefer) and this can wreak havoc with the flow of your page.&lt;br /&gt;&lt;br /&gt;On quick way around this is to apply overflow:hidden to the container, for whatever reason this will cause it to wrap cosily around it's children. I use this a lot when dealing with thumbnail galleries (a bunch of fixed-with elements floated left so they will align into nice columns no matter the width of the container), or anywhere else that a content area may wind up wit a floated element at the end (eg code inserted from a CMS).&lt;br /&gt;&lt;br /&gt;Unfortunately I discovered yesterday (or more pointedly a client did) that overflow:hidden also applies to the printed page (at least in Firefox, I haven't tested extensively). The print routine will do it's utmost to fit all of the content in the element on one page, even starting a new page for the purpose, but will not insert another page break until it is finished. For long sections of content this means being cut off.&lt;br /&gt;&lt;br /&gt;So it's back to empty elements with clear:both in the template or extensive use of &lt;a href="http://www.positioniseverything.net/easyclearing.html"&gt;clearfix&lt;/a&gt; for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-4133648187680949163?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/4133648187680949163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=4133648187680949163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4133648187680949163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4133648187680949163'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/07/overflowhidden-breaks-printing.html' title='overflow:hidden breaks printing'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-3157313329374575414</id><published>2010-07-12T15:55:00.002+12:00</published><updated>2010-07-12T16:00:18.550+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Don Norman talks about  innovation and the design-product gap</title><content type='html'>&lt;object width="560" height="315"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12022651&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=12022651&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="560" height="315"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href="http://vimeo.com/12022651"&gt;Don Norman at IIT Design Research Conference 2010&lt;/a&gt; from &lt;a href="http://vimeo.com/iitdesign"&gt;IIT Institute of Design&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;(via his blog)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-3157313329374575414?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/3157313329374575414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=3157313329374575414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3157313329374575414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3157313329374575414'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/07/don-norman-at-iit-design-research.html' title='Don Norman talks about  innovation and the design-product gap'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6410135605231722492</id><published>2010-06-12T21:30:00.007+12:00</published><updated>2010-06-12T22:19:51.402+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Targeting colors in Firefox</title><content type='html'>Recent versions of Firefox come with automatic "colour correction" for images. This has caused me a number of issues, one in particular is what happens with a background gradient. Here is the break between the end of the gradient image and the background color in a recent site I worked on.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DTOyS3nH0Ho/TBNdX4eMoqI/AAAAAAAAADw/8bjWkQQPtf8/s1600/compare-browser-colors.jpg"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 76px;" src="http://1.bp.blogspot.com/_DTOyS3nH0Ho/TBNdX4eMoqI/AAAAAAAAADw/8bjWkQQPtf8/s320/compare-browser-colors.jpg" border="0" alt="Comosite image assembled from 3 screenshots. From left to right: in Firefox there is a clear difference between the two parts of the image. In Chrome and Safari the image is a uniform color" id="BLOGGER_PHOTO_ID_5481827836317442722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The background color here is &lt;span style="background-color:#2788de; padding: 5px"&gt;#2788de&lt;/span&gt;, or if you want to see a smooth background in Firefox, &lt;span style="background-color:#4b7ed8; padding: 5px"&gt;#4b7ed8&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;[Aside - I use the &lt;a href="http://www.colorzilla.com/firefox/" target="_blank"&gt;Colorzilla&lt;/a&gt; add on to grab the correct color for Firefox from the  page itself.]&lt;br /&gt;&lt;br /&gt;The first time this happened I resorted to creating an excessively long background image, which is not a very elegant solution. Targeting Firefox just isn't generally as simple as targeting IE, but I have found a way to resolve this problem using the proprietary support for gradients: &lt;span style="background-color:#2788de; background: -moz-linear-gradient(top, #4b7ed8, #4b7ed8); padding: 5px"&gt;-moz-linear-gradient&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;background: #2788de; /* every other browser I've tested */&lt;br /&gt;background: -moz-linear-gradient(top, #4b7ed8, #4b7ed8); /* Recent Firefox */&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps someone for now. What worries me is what happens to these sites when Firefox changes again (I try not to think about all the sites already out there).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6410135605231722492?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6410135605231722492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6410135605231722492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6410135605231722492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6410135605231722492'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/06/targeting-colors-in-firefox.html' title='Targeting colors in Firefox'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DTOyS3nH0Ho/TBNdX4eMoqI/AAAAAAAAADw/8bjWkQQPtf8/s72-c/compare-browser-colors.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8524888570419637792</id><published>2010-04-24T11:29:00.006+12:00</published><updated>2011-04-16T10:30:04.748+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurs'/><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='start ups'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><title type='text'>Maybe I'm an Entrepreneur?</title><content type='html'>At IdeaLog an &lt;a href="http://idealog.co.nz/magazine/may-june-2010/interact/born-to-fail" target="_blank" title="Born to Fail"&gt;interview with Eric Ries&lt;/a&gt; addresses what he sees as the New Zealand culture of humility, and how this may be both a weakness and a strength when it comes to getting a startup off the ground.&lt;br /&gt;&lt;blockquote style="white-space: normal;"&gt;I’ve become a bit suspicious of the reports I get from Kiwis, because I’ve learned there’s a pathological humility in the culture. So plenty of people say they’ve always wanted to be an entrepreneur and when I ask what they do now, they say “I run my own business.” Is that not an entrepreneur? And they say “Well it doesn’t really count—it’s not a very good business.”&lt;br /&gt;&lt;br /&gt;I’m told New Zealand doesn’t have much of an entrepreneurship culture, and then everyone I meet is running their own business, or wants to. People tell me they’re doing three different projects, but they’re not a ‘real’ entrepreneur.&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;I was joking before about the kind of massive Kiwi humility complex, which I find baffling. But humility is a very valuable entrepreneurial trait, and so if you actually harness humility for good, what it means is that when you're confronted with difficult facts that contradict your vision, you'll have the kind of strength of self to see the reality for what it is, which could be very valuable.&lt;/blockquote&gt;&lt;br /&gt;Anyway, if I ever become the 'involved in a startup' type of entrepreneur, this article is something I want to remember.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8524888570419637792?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8524888570419637792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8524888570419637792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8524888570419637792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8524888570419637792'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/04/maybe-im-entrepreneur.html' title='Maybe I&apos;m an Entrepreneur?'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7105490382987677993</id><published>2010-04-15T10:53:00.000+12:00</published><updated>2010-04-15T10:54:59.512+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='blog admin'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><title type='text'>A template change</title><content type='html'>I've just made a couple of changes to the blog template, firstly widening it to accommodate the wider widths we're seeing for video these days and secondly replacing the rounded border images with border-radius CSS. &lt;br /&gt;&lt;br /&gt;Of course Internet Explorer users won't be able to see the rounded corners, so I've also used conditional comments to put a little notice and links to other browsers at the top of the sidebar (inside an html widget). As a bonus I've included another conditional comment targeted squarely at IE6 users asking them to upgrade, even if only to a later version of IE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7105490382987677993?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7105490382987677993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7105490382987677993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7105490382987677993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7105490382987677993'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/04/template-change.html' title='A template change'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7832032664802227199</id><published>2010-04-15T09:48:00.002+12:00</published><updated>2010-04-15T09:50:43.454+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><title type='text'>How we got the Internet</title><content type='html'>Yoinked from &lt;a href="http://www.readwriteweb.com/archives/top_10_youtube_videos_about_the_web" target="_blank"&gt;Top 10 YouTube Videos About The Web @ ReadWriteWeb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Web 2.0 ... The Machine is Us/ing Us (or, the evolution of text in the electronic age)&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6gmP4nk0EOE&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/6gmP4nk0EOE&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Nifty History of the Internet&lt;br /&gt;&lt;object width="560" height="340"&gt;&lt;param name="movie" value="http://www.youtube.com/v/9hIQjrMHTv4&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/9hIQjrMHTv4&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7832032664802227199?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7832032664802227199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7832032664802227199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7832032664802227199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7832032664802227199'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/04/how-we-got-internet.html' title='How we got the Internet'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-950648262904779391</id><published>2010-04-11T12:16:00.003+12:00</published><updated>2010-04-11T12:23:35.116+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='barcamp'/><title type='text'>Barcamp Christchurch 2010 (#bcchch)</title><content type='html'>So I spent most of yesterday at the  &lt;a href="http://barcamp.org/BarCamp-Christchurch-2010" target="_blank"&gt;Christchurch BarCamp&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Unconference" target="_blank"&gt;unconference&lt;/a&gt; (twitter #tag &lt;a href="http://twitter.com/#search?q=%23bcchch" target="_blank"&gt;#bcchch&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;It Rocked.&lt;br /&gt;&lt;br /&gt;I don't think an offical head count was ever done, but there would have been between 30 and 40 people from the IT scene in Christchurch there, with a focus on internet technologies ranging from random webmonkeys like myself to high-powered programmers living in NZ but teleworking for companies in Australia or the States. There were even a couple of people down from Wellington.&lt;br /&gt;&lt;br /&gt;Some of the topics covered were&lt;br /&gt;- introducing open source projects with local connections like &lt;a href="http://www.crowdfusion.com/" target="_blank"&gt;CrowdFusion&lt;/a&gt; (publishing) and &lt;a href="http://groupserver.org/" target="_blank"&gt;GroupServer&lt;/a&gt; (mailing list management),&lt;br /&gt;- an introduction to Forensic Computing, &lt;br /&gt;- background on the ACTA and &lt;a href="http://publicacta.org.nz/" target="_blank"&gt;publicACTA&lt;/a&gt; meetings which were happening in Wellington yesterday.&lt;br /&gt;- &lt;a href="http://midnightnote.com/" target="_blank"&gt;The Case of the Midnight Note&lt;/a&gt; a 'transmedia' game which the Wellington tech community ran across Twitter/Facebook/blogs/the real world as a fundraiser to send people to &lt;a href="http://www.webstock.org.nz/" target="_blank"&gt;Webstock&lt;/a&gt;, and how the team behind it is partnered with &lt;a href="http://www.digitalnz.org/" target="_blank"&gt;DigitalNZ&lt;/a&gt; to see what sort of Augmented Reality games you can create by merging the world of today with the archived history of yesterday. &lt;br /&gt;- ethics + sustainable development practice for programmers&lt;br /&gt;- some of the really shiny stuff you can do with html5/css3&lt;br /&gt;- Idea management&lt;br /&gt;- A round up of various informal groups that meet up regularly in Christchurch to discuss internet technologies &amp; issues&lt;br /&gt;- and more&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-950648262904779391?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/950648262904779391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=950648262904779391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/950648262904779391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/950648262904779391'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/04/barcamp-christchirch-2010-bcchch.html' title='Barcamp Christchurch 2010 (#bcchch)'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5186613480691572074</id><published>2010-03-16T10:25:00.003+13:00</published><updated>2010-03-16T10:32:53.427+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='paypal'/><title type='text'>Paypal returning "You have requested an outdated version of PayPal" page</title><content type='html'>So I was taking a rare and precious four-day weekend, when someone realised all their PayPal integrations were not working. Arriving at the Paypal site a customer would be greeted with the message "You have requested an outdated version of PayPal" (followed by a suggestion that it might due to using a bookmark).&lt;br /&gt;&lt;br /&gt;A support request later it turns out that the error is due to the form being submitted with enctype="multipart/form-data" . A known issue that they're working on, but with no predicted date of resolution. However removing the enctype from the form does solve it.&lt;br /&gt;&lt;br /&gt;It seems this happens often enough that I'm surprised this information was not available in the forums or the knowledge base.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5186613480691572074?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5186613480691572074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5186613480691572074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5186613480691572074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5186613480691572074'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/03/paypal-returning-you-have-requested.html' title='Paypal returning &quot;You have requested an outdated version of PayPal&quot; page'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5742140948841280074</id><published>2010-02-23T15:24:00.001+13:00</published><updated>2010-02-23T15:26:52.253+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><title type='text'>Sorry, we don't need you any more</title><content type='html'>This is the sort of thing that I normally put in my personal blog, but I just threw a tweet that might get followed back here so I'll x-post.&lt;br /&gt;&lt;br /&gt;Stuff has the story of an &lt;a href="http://www.stuff.co.nz/the-press/news/3363875/Overstayer-faces-leaving-her-child" target="_blank"&gt;Austrian working in the Marlborough vineyards&lt;/a&gt;. She has been in NZ 5 years on a work permit, in that time she has gained NZ horticultural qualifications, taken up a permanent position and had a baby daughter (for whom she is sole caregiver).&lt;br /&gt;&lt;br /&gt;She obviously wants to work here, and in an industry which has suffered labour shortages over the last 5 years, making her the best kind of employee our economy could have.&lt;br /&gt;&lt;br /&gt;Immigration has now refused to extend her work permit, meaning she will have to return to Austria and potentially leave her 16 month daughter behind here. &lt;br /&gt;&lt;br /&gt;Immigration cites the fact that "New Zealanders are now available to do the work" as the recession drives more people who would rather be working elsewhere to apply for the available jobs. These people apparently "can be easily trained". A training investment which I see is going to evaporate as soon as those people get the opportunity to take themselves back to what they really want to do. &lt;br /&gt;&lt;br /&gt;In fact if as Ms Dallarosa says:&lt;br /&gt;"I do understand where Immigration is coming from, but the thing is a lot of people still get brought in from overseas to work in the vineyards who have no qualification to work in the vineyards, but I do."&lt;br /&gt;... it's even worse.&lt;br /&gt;&lt;br /&gt;To their credit and obviously recognising what a valuable employee they had, her employer Constellation New Zealand kept her position open as long as they could but eventually have had to replace her 'with a New Zealander'. Highlighting the fact that solving the issue is not as simple as someone else offering her a job.&lt;br /&gt;&lt;br /&gt;"With a New Zealander". 5 years contributing to the economy and every wish to keep doing so, NZ qualifications in an industry frequently short of staff, a NZ-born daughter that she wants to raise here - how is this woman &lt;em&gt;not&lt;/em&gt; a New Zealander in any way that matters?&lt;br /&gt;&lt;br /&gt;Moreover, that's 5 years of investment NZ has in her skills that Immigration is perfectly happy to just throw away. No wonder our economy isn't going anywhere with that sort of attitude.&lt;br /&gt;&lt;br /&gt;It begs the question, how many more valuable, skilled people are being given the boot just when we need them most, that we're never going to hear about because they don't have a convenient human-interest hook like a young daughter? &lt;br /&gt;&lt;br /&gt;Or, if I'm being especially cynical, because they're not white?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5742140948841280074?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5742140948841280074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5742140948841280074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5742140948841280074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5742140948841280074'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/02/sorry-we-dont-need-you-any-more.html' title='Sorry, we don&apos;t need you any more'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1226157308828521713</id><published>2010-02-13T14:16:00.004+13:00</published><updated>2010-02-13T14:27:03.441+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='how real people behave'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><category scheme='http://www.blogger.com/atom/ns#' term='websites'/><title type='text'>Do you know what a login page looks like?</title><content type='html'>After making my previous post I was pointed at another about the recent &lt;a href="http://quietbabylon.posterous.com/i-have-some-opinions-about-the-rww-facebook-l" target="_blank" title="at the Quiet Babylonian"&gt;RWW/Facebook login mixup&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To summarise: a post on &lt;a href="http://www.readwriteweb.com" target="_blank"&gt;Read Write Web&lt;/a&gt; about Facebook became the #1 google result for "Facebook Login". This resulted in a lot of people using similar behaviour to that mentioned previously clicking through in an attempt to log in to their facebook accounts. Because commenting at RWW supports OpenID, there was a facebook logo you could click on to autheticate with your facebook details... (OpenID of course connects you to the authenticating site briefly to enter these).&lt;br /&gt;&lt;br /&gt;Despite RWW adding a big bold disclaimer at the top of the post people &lt;em&gt;kept doing this&lt;/em&gt;. &lt;br /&gt;&lt;br /&gt;These weren't stupid people, they were just looking to login like they had done every time previously and faced with a different &lt;em&gt;visual&lt;/em&gt; assumed it was some sort of redesign and scanned for something recognisable that would help with that task. Like a button with the facebook logo next to a form field.&lt;br /&gt;&lt;br /&gt;The post linked above talks at length about about the implications of this.&lt;br /&gt;&lt;blockquote cite="http://quietbabylon.posterous.com/i-have-some-opinions-about-the-rww-facebook-l" style="white-space:normal"&gt;If you are an interface designer, a brand manager or a security expert, your reaction to this incident should be one of deep humility. Your interface, your brand and your security scheme is much more fragile than you'd ever dared to fear. All of your work has come to naught.&lt;/blockquote&gt;&lt;br /&gt;These people represent the vast majority of internet users. It's a rare breed who actually 'Use the Internet' in terms of urls and pages links. Most people 'Log into Facebook' or 'Watch Youtube' or 'Order a Pizza'. &lt;br /&gt;&lt;br /&gt;We can't feasibly make all these people 'more like us' (developers), nor should we try. We build websites that they can use, and they shape a future where 'the internet' means about the same as 'the pavement' and requires about as much thought when it's used.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1226157308828521713?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1226157308828521713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1226157308828521713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1226157308828521713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1226157308828521713'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/02/do-you-know-what-login-page-looks-like.html' title='Do you know what a login page looks like?'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-867966998216088216</id><published>2010-02-13T10:05:00.003+13:00</published><updated>2010-02-13T10:19:28.065+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><title type='text'>Do you know what a (web) browser is?</title><content type='html'>Believe it or not, most internet users don't. As this video (ignoring the fact that it is a stealth ad for &lt;a href="http://www.google.com/chrome/" target="_blank"&gt;Google Chrome&lt;/a&gt;) goes out to demonstrate.&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="295"&gt;&lt;param name="movie" value="http://www.youtube.com/v/o4MwTvtyrUQ&amp;hl=en_US&amp;fs=1&amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/o4MwTvtyrUQ&amp;hl=en_US&amp;fs=1&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;You might be laughing about now, but as web designers and developers we need to be aware of the amount of knowledge we assume everyone has about the internet, and just how wrong those assumptions can be. The old "The internet is Google/Yahoo/AOL" meme is true - and people really do think that the 'Address Bar' is the search box on the homepage of their favourite search engine and the quickest way to any website is to enter the url there then click on the first result.&lt;br /&gt;&lt;br /&gt;There are good arguments why people shouldn't need to know or care that the program they use to access the internet is called a 'Browser', or even that it's a 'program'. We need to remember we're building websites for the people who will be using them, not necessarily people like us. &lt;br /&gt;&lt;br /&gt;How to explain this to the client who is commissioning the site (who sees it from another perspective again) is a topic I see often in my newsfeeds.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-867966998216088216?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/867966998216088216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=867966998216088216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/867966998216088216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/867966998216088216'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/02/do-you-know-what-web-browser-is.html' title='Do you know what a (web) browser is?'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7744492061766257305</id><published>2010-01-13T15:38:00.007+13:00</published><updated>2010-01-13T16:41:19.057+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>A 'back' button with php</title><content type='html'>&lt;p&gt;Problem:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Site design includes a 'Return' button which effectively lifts the visitor 1 level in the site structure.&lt;/li&gt;&lt;li&gt;As crosslinks are developed between different sections of the site the behaviour of the return button fails.&lt;/li&gt;&lt;li&gt;If hardcoded it lifts you one level in the current section rather than taking you back where you came from, or&lt;/li&gt;&lt;li&gt;if instituted dynamically (using HTTP_REFERER) if you try and use it to go back more than one step you get stuck in a loop between two pages.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;A functional, session based solution&lt;/h4&gt;&lt;p&gt;This solution consists of two functions. One to keep track of the last few pages, and one to generate the link.&lt;/p&gt;&lt;p&gt;The first is called is called once the page is committed to output (last thing before starting your &amp;lt;html&amp;gt; or &amp;lt;!doctype ... preferably. We don't want it included in pages which only perform a processing function then redirect.&lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;function sethistory()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;// make sure the container array exists&lt;br /&gt;&amp;nbsp;&amp;nbsp;// the paranoid will also check here that sessions are even being used &lt;br /&gt;&amp;nbsp;&amp;nbsp;if(!isset($_SESSION['history']))&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$_SESSION['history'] = array();&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// make an easier to use reference to the container&lt;br /&gt;&amp;nbsp;&amp;nbsp;$h =&amp; $_SESSION['history'];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// get the referring page and this page&lt;br /&gt;&amp;nbsp;&amp;nbsp;// we need to construct matching strings&lt;br /&gt;&amp;nbsp;&amp;nbsp;// put the referring page straight in the array&lt;br /&gt;&amp;nbsp;&amp;nbsp;$h[] = $from = $_SERVER['HTTP_REFERER']; &lt;br /&gt;&amp;nbsp;&amp;nbsp;$here = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// find out how many elements we have&lt;br /&gt;&amp;nbsp;&amp;nbsp;$count = count($h);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;//don't waste memory - trim off old entries&lt;br /&gt;&amp;nbsp;&amp;nbsp;while($count&amp;gt;20)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;array_shift($h);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$count--;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;// don't want to get stuck in a reference loop&lt;br /&gt;&amp;nbsp;&amp;nbsp;// this can be falsely triggered by pages that link to each other &lt;br /&gt;&amp;nbsp;&amp;nbsp;// but hopefully rarely and the button will still behave rationally&lt;br /&gt;&amp;nbsp;&amp;nbsp;// also catches use of the browser 'Back' button/key&lt;br /&gt;&amp;nbsp;&amp;nbsp;// remove last two items to rewind history state&lt;br /&gt;&amp;nbsp;&amp;nbsp;while($count &amp;gt; 1 &amp;&amp; $h[$count-2] == $here)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;array_pop($h);&lt;br /&gt;&amp;nbsp;&amp;nbsp;array_pop($h);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$count -= 2; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;// don't want to get stuck on one page either&lt;br /&gt;&amp;nbsp;&amp;nbsp;// for pages that process themselves or are returned to after process script&lt;br /&gt;&amp;nbsp;&amp;nbsp;// remove last item to rewind history state&lt;br /&gt;&amp;nbsp;&amp;nbsp;while($count &amp;gt; 0 &amp;&amp; $h[$count-1] == $here)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;array_pop($h);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$count--;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// all done&lt;br /&gt;&amp;nbsp;&amp;nbsp;return;&lt;br /&gt;} &lt;/code&gt;&lt;/blockquote&gt;&lt;p&gt;The second function is called to generate the button itself. It has one recommended and one optional argument.&lt;/p&gt;&lt;p&gt;&lt;code&gt;$defaulturl&lt;/code&gt; is the url to use if there is no history present (in the sample problem this is the logical higher tier page for the section)&lt;br /&gt;&lt;code&gt;$override&lt;/code&gt; when true forces the function to use $defaulturl. This may be required when dealing with paged result sets, for example.&lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;function returnlink($defaulturl='index.php', $override=false)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;// initialise variables&lt;br /&gt;&amp;nbsp;&amp;nbsp;$c = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;$url = '';&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// check that the history container exists&lt;br /&gt;&amp;nbsp;&amp;nbsp;// if so check it has something in it and set $url&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(isset($_SESSION['history']))&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$c = count($_SESSION['history']);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$url = ($c &amp;gt; 0) ? $_SESSION['history'][$c-1] : '';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// check for use $defaulturl conditions&lt;br /&gt;&amp;nbsp;&amp;nbsp;// $c may still be &amp;gt; 0 if the page was accessed directly&lt;br /&gt;&amp;nbsp;&amp;nbsp;// but $url will be blank&lt;br /&gt;&amp;nbsp;&amp;nbsp;if($override || $c == 0 || $url == '')&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return '&amp;lt;a href="'.$defaulturl.'" class="return"&amp;gt;Return&amp;lt;/a&amp;lt;';&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return '&amp;lt;a href="'.$url.'" class="return"&amp;gt;Return&amp;lt;/a&amp;gt;';  &lt;br /&gt;&amp;nbsp;&amp;nbsp;} &lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7744492061766257305?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7744492061766257305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7744492061766257305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7744492061766257305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7744492061766257305'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2010/01/back-button-with-php.html' title='A &apos;back&apos; button with php'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-9142303479470912267</id><published>2009-10-04T14:25:00.003+13:00</published><updated>2009-10-04T14:49:34.244+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Chaining css classes on one element</title><content type='html'>You can chain-reference classnames within the same class attribute by omitting the space between them (yes, even in IE6!). For example&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;li class=&amp;quot;current-page-item&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;first&amp;quot;&amp;gt;&lt;br /&gt;(.current-page-item .first)&lt;/code&gt;&lt;/blockquote&gt;is equivalent to&lt;blockquote&gt;&lt;code&gt;&amp;lt;li class=&amp;quot;current-page-item first&amp;quot;&amp;gt;&amp;lt;a&amp;gt;&lt;br /&gt;(.current-page-item.first) a&lt;/code&gt;&lt;/blockquote&gt;This can&lt;ul&gt;&lt;li&gt; save significantly on the amount of unique identifiers and classes needed in a page&lt;/li&gt;&lt;li&gt;is useful when you have multiple elements to style within eg your first or last item on a list&lt;/li&gt;&lt;li&gt;lets you specify common code in one style and minor changes in another&lt;/li&gt;&lt;/ul&gt;Example of the latter: a project I am currently working in has icons next to most headings &lt;code&gt;h1, h2 etc&lt;/code&gt;. These are in a &lt;code&gt;span&lt;/code&gt; classed as &lt;code&gt;.icon .[function]&lt;/code&gt; . The styles break down to something like&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;span class=&amp;quot;icon part&amp;quot;&amp;gt;Sample heading&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;h2&amp;gt;&amp;lt;span class=&amp;quot;icon cog&amp;quot;&amp;gt;Sample sub heading&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;br /&gt;h1&lt;br /&gt;{&lt;br /&gt; //basic h1 styles&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;h2&lt;br /&gt;{&lt;br /&gt; //basic h2 styles&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.icon {&lt;br /&gt; // span positioning and other common traits&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.icon.parts&lt;br /&gt;{&lt;br /&gt; //background image (icon) for parts headings&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.icon.cogs&lt;br /&gt;{&lt;br /&gt; //background image (icon) for cogs headings&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Tip recycled up from the comments on &lt;a href="http://webknight-nz.blogspot.com/2009/04/styling-first-and-last-list-items-and.html"&gt;Styling first and last list items in Wordpress&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-9142303479470912267?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/9142303479470912267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=9142303479470912267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/9142303479470912267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/9142303479470912267'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/10/chaining-css-classes-on-one-element.html' title='Chaining css classes on one element'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-2283224492971451387</id><published>2009-09-29T12:55:00.005+13:00</published><updated>2010-06-28T14:43:19.447+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Firefox fails to return false from onsubmit</title><content type='html'>This is a problem I run into occasionally when doing form validation with javascript. It's usually the result of a non-existent field &lt;ul&gt;&lt;li&gt;typo&lt;/li&gt;&lt;li&gt;a name change which hasn't been carried through&lt;/li&gt;&lt;li&gt;a field which has been removed from the form&lt;/li&gt;&lt;/ul&gt;being called in the validation script - at which point it may terminate without returning either true or false, and FF will proceed to submit the form.&lt;br /&gt;&lt;br /&gt;[Clarification: this is not a solution to the problem, which is treated by identifying which of the above has happened and fixing it. This just a simple example of validating with javascript]&lt;br /&gt;&lt;br /&gt;For a simple form I use a script like this:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;The function call (note that you actually have to return true or false from the onsubmit):&lt;br /&gt;&amp;lt;form [form attributes] onsubmit=&amp;quot;return validateForm(this)&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div id=&amp;quot;message&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;[form fields]&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;The function (usually included in a .js file somewhere):&lt;br /&gt;function validateForm(id)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;message = &amp;#039;&amp;#039;; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;// example validation checks&lt;br /&gt;&amp;nbsp;&amp;nbsp;f = id.username;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(f.value==&amp;#039;&amp;#039;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message += &amp;#039;Please enter a username &amp;lt;br /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.className = f.classname + &amp;#039;_invalid&amp;#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;f = id.password.value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;g = id.password_confirm.value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(f.length &amp;lt; 8)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message += &amp;#039;Please enter a longer password (at least 8 characters) &amp;lt;br /&amp;gt;&amp;#039;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.className = f.classname + &amp;#039;_invalid&amp;#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;else if(f != g)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message += &amp;#039;Passwords do not match &amp;lt;br /&amp;gt;&amp;#039;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.className = f.classname + &amp;#039;_invalid&amp;#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;g.className = g.classname + &amp;#039;_invalid&amp;#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;//if message has content output it and return false, otherwise proceed to return true&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(message.length &amp;gt;0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.getElementById(&amp;#039;message&amp;#039;).innerHTML = message;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;return true;&lt;br /&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Of course if someone is browsing without javascript enabled this won't be triggered, so always validate the data you receive at the server as well.&lt;/li&gt;&lt;li&gt;Another of my pet irritations; people who name/id a field 'name' and the submit button 'submit'. It is very logical, but it often results in javascript screwiness&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-2283224492971451387?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/2283224492971451387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=2283224492971451387' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2283224492971451387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2283224492971451387'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/09/firefox-fails-to-return-false-from.html' title='Firefox fails to return false from onsubmit'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-4860199568349644352</id><published>2009-09-25T10:36:00.002+12:00</published><updated>2009-09-25T10:39:34.177+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><title type='text'>Useful usability pointers</title><content type='html'>In my RSS this morning - a very useful summary from Smashing Magazine of &lt;a href="http://bit.ly/vASBT" target="_blank"&gt;10 Useful Usability Findings and Guidelines&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-4860199568349644352?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/4860199568349644352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=4860199568349644352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4860199568349644352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4860199568349644352'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/09/useful-usability-pointers.html' title='Useful usability pointers'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8006816730126147886</id><published>2009-09-16T10:14:00.006+12:00</published><updated>2009-09-16T10:52:09.253+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='regular expressions'/><title type='text'>Regex to strip html entities</title><content type='html'>This is a bit of a quick and dirty way to pull all html codes such as &amp;amp;amp; and &amp;amp;quot; out of a text string. There aren't a lot of use cases for it, I just needed to clean up some code for output that had been htmlentities()ed then stored. In this particular case losing the punctuation didn't matter.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;$clean = preg_replace("/&amp;.{0,}?;/",'',$source);&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;The ? after the repeater is required to make it 'lazy', otherwise the pattern will remove everything between the first '&amp;' and the last ';' in the string instead of individual codes.&lt;br /&gt;&lt;br /&gt;It could be improved by changing the repeater to match the {min,max} lengths of the html code set, which I wasn't bothered to look up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8006816730126147886?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8006816730126147886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8006816730126147886' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8006816730126147886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8006816730126147886'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/09/regex-to-strip-html-entities.html' title='Regex to strip html entities'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8607920881593710716</id><published>2009-09-10T10:24:00.005+12:00</published><updated>2009-09-10T10:37:29.851+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><title type='text'>The traditional economic model breaks for content on the internet</title><content type='html'>The Brain Traffic Blog has a post by Melissa Rach on how the infinite replication of content allowed by the internet has &lt;a href="http://blog.braintraffic.com/2009/09/the-value-of-content-part-1-adam-smith-never-expected-this/" target="_blank" title="Adam Smith never expected this"&gt;broken the traditional economic model&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In brief, content makes the the World Wide Web and is of critical importance to any successful website but it also lacks the features which traditionally give products value, so how do you price it's creation? &lt;br /&gt;&lt;br /&gt;Melissa promises to address that conundrum in the next instalment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8607920881593710716?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8607920881593710716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8607920881593710716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8607920881593710716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8607920881593710716'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/09/traditional-economic-model-breaks-for.html' title='The traditional economic model breaks for content on the internet'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8504143987984247377</id><published>2009-08-25T09:23:00.004+12:00</published><updated>2009-08-25T09:42:47.354+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Embedding an RSS feed with javascript / AJAX</title><content type='html'>A client wanted to pull somebody else's public news feed into their page ('like this other site'). I was able to determine that the other site used javascript for this, but the page used so much of it that trying to find the particular script was futile.&lt;br /&gt;&lt;br /&gt;After a variety of fruitless searches for terms like 'javascript embed RSS' I started to use alternate terms for embed (import, fetch, poll) and got somewhere.&lt;br /&gt;&lt;br /&gt;This tutorial at &lt;a href="http://www.xml.com/pub/a/2006/09/13/rss-and-ajax-a-simple-news-reader.html" target="_blank" title="A simple AJAX news reader"&gt;xml.com&lt;/a&gt; was a good start and provided the basic code for manipulating the xml supplied by the RSS feed. What it failed to point out was that for security reasons you can't generally make an XMLHttpRequest to another domain. (I found that it would return a 200 OK response, but no actual content). &lt;br /&gt;&lt;br /&gt;More googling provided the way to &lt;a href="http://www.javascriptkit.com/dhtmltutors/ajaxticker/ajaxticker2.shtml" target="_blank" title="PHP script to get the contents of a remote file"&gt;use a php file as an intermediary&lt;/a&gt;, including local caching.&lt;br /&gt;&lt;br /&gt;A little tinkering with the xml.com script to output the desired html and take the source of the feed from a variable declared in the page body (editable in the client's CMS), and done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8504143987984247377?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8504143987984247377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8504143987984247377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8504143987984247377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8504143987984247377'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/08/embedding-rss-feed-with-javascript-ajax.html' title='Embedding an RSS feed with javascript / AJAX'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7051167124570333535</id><published>2009-07-21T14:58:00.003+12:00</published><updated>2009-07-21T15:14:01.144+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='web services'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Bad colour correction in Firefox 3.5</title><content type='html'>I upgraded to Firefox 3.5 this week and discovered that it's colour management does nasty things to my photo galleries making the photos appear artificially, harshly brightened.&lt;br /&gt;&lt;br /&gt;I googled up &lt;a href="http://support.mozilla.com/tiki-view_forum_thread.php?locale=fi&amp;comments_parentId=381785&amp;forumId=1" target="_blank"&gt;this support ticket&lt;/a&gt; and a link from there to this developer article on &lt;a href="https://developer.mozilla.org/En/ICC_color_correction_in_Firefox" target="_blank"&gt;ICC color correction in Firefox&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I'm not quite hardware savvy enough to understand the underlying issues around local monitor colour profiles, but I can follow the instructions for turning colour correction off in Firefox.&lt;br /&gt;&lt;br /&gt;For the non-technical: use &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/6891" target="_blank"&gt;this colour management add on&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For the technical:&lt;ul&gt;&lt;li&gt;pull up about:config&lt;/li&gt;&lt;li&gt;locate the &lt;a href="http://kb.mozillazine.org/Gfx.color_management.mode" target="_blank"&gt;gfx.color_management.mode&lt;/a&gt; setting&lt;/li&gt;&lt;li&gt;set it to '0' to disable colour management&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The issue isn't completely Firefox/local however, the original files uploaded to my photohost (SmugMug, but even Flickr had the same issue) are still fine when viewed. It's the automatically generated smaller versions which must either have or lack some information which triggers the correction.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7051167124570333535?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7051167124570333535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7051167124570333535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7051167124570333535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7051167124570333535'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/07/bad-colour-correction-in-firefox-35.html' title='Bad colour correction in Firefox 3.5'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1269870602704990890</id><published>2009-06-21T12:18:00.005+12:00</published><updated>2009-06-21T12:53:32.960+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='progressive enhancement'/><category scheme='http://www.blogger.com/atom/ns#' term='WordPress'/><title type='text'>Alternate word colours with css and javascript</title><content type='html'>I had a request from a client with a Wordpress blog who was manually alternating word colours in their headings - was there a way they could do the same thing with the headings for the sidebar widgets?&lt;br /&gt;&lt;br /&gt;My first thought was that something similar to the way I added &lt;a href="http://webknight-nz.blogspot.com/2009/04/styling-first-and-last-list-items-and.html" title="Styling first and last list items"&gt;first and last markers to WordPress list items&lt;/a&gt; might work, but reaching the template code block and finding&lt;blockquote&gt;&lt;code&gt;/* Widgetized sidebar, if you have the plugin installed. */&lt;br /&gt;if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() )....&lt;/code&gt;&lt;/blockquote&gt;... I decided there might be a better way than tracking through functions.&lt;br /&gt;&lt;br /&gt;The solution was a modification of the addBehaviour() javascript I use to &lt;a href="http://webknight-nz.blogspot.com/2009/03/addbehaviour-function.html" title="The addBehaviour function"&gt;add onclick events to links after the page loads&lt;/a&gt;. &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Instead of targeting links we target the &lt;code&gt;&amp;lt;h2 class=&amp;quot;widgettitle&amp;quot;&amp;gt;&lt;/code&gt; tags&lt;/li&gt;&lt;li&gt;adding a classed span around every second word&lt;/li&gt;&lt;li&gt;the color of which is controlled from the style sheet.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;//...&lt;br /&gt;&lt;br /&gt;function addColor()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var h2s = document.getElementsByTagName(&amp;quot;h2&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;for (var i = 0; i &amp;lt; h2s.length; i++) &lt;br /&gt;&amp;nbsp;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (h2s[i].getAttribute(&amp;quot;class&amp;quot;) == &amp;quot;widgettitle&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the content&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content = h2s[i].innerHTML;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  //make an array of words&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; words = content.split(&amp;#039; &amp;#039;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newcontent = &amp;quot;&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var w in words)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(j==0) // every first word&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newcontent = newcontent + words[w] + &amp;#039; &amp;#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j=1; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else // wrap a span around every second word&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newcontent = newcontent + &amp;#039;&amp;lt;span class=&amp;quot;h2_alt_color&amp;quot;&amp;gt;&amp;#039; + words[w] + &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j=0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // replace content&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h2s[i].innerHTML = newcontent;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// function added to onload event as usual (addLoadListener() not included here)&lt;br /&gt;addLoadListener(addColor);&lt;/code&gt;&lt;/blockquote&gt;This might not work as well if there was anything except plain text inside the &amp;lt;h2&amp;gt; tags, so may only serve as the basis for as a more general solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1269870602704990890?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1269870602704990890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1269870602704990890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1269870602704990890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1269870602704990890'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/06/alternate-word-colours-with-css-and.html' title='Alternate word colours with css and javascript'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-467944813125991608</id><published>2009-06-12T21:04:00.003+12:00</published><updated>2009-06-12T21:13:14.058+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='braille strip'/><category scheme='http://www.blogger.com/atom/ns#' term='screen readers'/><category scheme='http://www.blogger.com/atom/ns#' term='accessability'/><title type='text'>Use of a braille strip to navigate the web</title><content type='html'>&lt;a href="http://bit.ly/HD1Es" target="_blank"&gt;Video at DingoAccess&lt;/a&gt;, by Rodger Hudson of Web Usability.&lt;br /&gt;&lt;br /&gt;Hat tip &lt;a href="http://www.456bereastreet.com" target="_blank"&gt;456 Berera Street&lt;/a&gt;, and here's a youtube video &lt;a href="http://www.youtube.com/watch?v=AmUPhEVWu_E" target="_blank"&gt;demonstrating the use of a screen reader&lt;/a&gt; that I posted earlier in the year, via the same vector.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-467944813125991608?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/467944813125991608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=467944813125991608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/467944813125991608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/467944813125991608'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/06/use-of-braille-strip-to-navigate-web.html' title='Use of a braille strip to navigate the web'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1336885000855096736</id><published>2009-06-02T08:23:00.005+12:00</published><updated>2010-09-21T14:12:57.647+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='christchurch'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre network'/><title type='text'>Council bringing fibre to Christchurch</title><content type='html'>via my twitter search monitor...&lt;br /&gt;&lt;a href="http://www.nbr.co.nz/article/much-ado-about-broadband-garden-city-103150" target="_blank"&gt;http://www.nbr.co.nz/...&lt;/a&gt;&lt;br /&gt;&lt;blockquote cite="http://www.nbr.co.nz/article/much-ado-about-broadband-garden-city-103150"&gt;&lt;strong&gt;Much ado about broadband in the Garden City&lt;/strong&gt;&lt;br /&gt;Council-owned broadband company, Enable Networks, will spend another $36 million and will seek $500 million of government funding to deliver its fibre optic network to every city household.&lt;/blockquote&gt;&lt;br /&gt;And the &lt;a href="http://enablenetworks.co.nz/" target="_blank"&gt;Enable Networks&lt;/a&gt; website.&lt;br /&gt;&lt;br /&gt;Working from home in website development my internet connection is like lifeblood to me. Fortunately my part of town in is the TelstraClear fibre network, and I've been connected with them pretty much as long as it's been in the ground. &lt;br /&gt;&lt;br /&gt;Fibre-to-the-wall is the very big reason I don't bother looking for an alternative to TelstraClear in my area, but they don't actually provide the services I would like. I'd be really keen to see what alternatives pop up on the Enable network, especially in the realm of VOIP and streaming media.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1336885000855096736?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1336885000855096736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1336885000855096736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1336885000855096736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1336885000855096736'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/06/council-bringing-fibre-to-christchurch.html' title='Council bringing fibre to Christchurch'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-538756146931982172</id><published>2009-05-23T12:28:00.014+12:00</published><updated>2009-05-23T13:42:44.164+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='web services'/><category scheme='http://www.blogger.com/atom/ns#' term='google mail'/><category scheme='http://www.blogger.com/atom/ns#' term='gmail'/><title type='text'>Juicy Gmail Labs gadgets and their uses</title><content type='html'>This morning I spent some time re-jigging the Labs settings in my Gmail account. The list to choose from keeps getting longer. To enable any of these go to your Gmail settings and look for the &lt;span style="font-weight: bold;"&gt;Labs&lt;/span&gt; tab&lt;br /&gt;&lt;br /&gt;These are what I settled on as most important and practical:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; clear:left;"&gt;Inbox Preview, Multiple Inboxes, Title Tweaks&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DTOyS3nH0Ho/ShdRiKtSqbI/AAAAAAAAACI/Mm3MqRF0jZs/s1600-h/mod_titletweaks.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://4.bp.blogspot.com/_DTOyS3nH0Ho/ShdRiKtSqbI/AAAAAAAAACI/Mm3MqRF0jZs/s320/mod_titletweaks.png" alt="" id="BLOGGER_PHOTO_ID_5338825530702735794" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DTOyS3nH0Ho/ShdRhzPvl7I/AAAAAAAAACA/PdQ1WM-xAX0/s1600-h/mod_lighttlist.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://4.bp.blogspot.com/_DTOyS3nH0Ho/ShdRhzPvl7I/AAAAAAAAACA/PdQ1WM-xAX0/s320/mod_lighttlist.png" alt="" id="BLOGGER_PHOTO_ID_5338825524404787122" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DTOyS3nH0Ho/ShdRhzEy9mI/AAAAAAAAAB4/ZafcbIJkAWI/s1600-h/mod_inboxpreview.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://3.bp.blogspot.com/_DTOyS3nH0Ho/ShdRhzEy9mI/AAAAAAAAAB4/ZafcbIJkAWI/s320/mod_inboxpreview.png" alt="" id="BLOGGER_PHOTO_ID_5338825524358870626" border="0" /&gt;&lt;/a&gt;&lt;br style="clear:both" /&gt;The first of these provides a valuable glimpse at what is awaiting while the full Gmail interface is loading. If there is nothing new or urgent I can move on immediately.&lt;br /&gt;&lt;br /&gt;The second is the best way of handling multiple email addresses from one gmail account. I set up filters to automatically archive ("Skip the inbox") messages from or to other accounts, and then a new inbox pane to group and display each account.&lt;br /&gt;&lt;br /&gt;I'm still waiting for a way to append a descriptor to the subject line itself, to aid filtering in POP/IMAP mail retrieval.&lt;br /&gt;&lt;br /&gt;The third just makes it easier for me to spot when new mail comes in on a taskbar full of tabs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; clear:left;"&gt;Forgotten Attachment Detector, Send and Archive, Undo Send&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdRw5fYQmI/AAAAAAAAACg/gTNHTKNMtnY/s1600-h/mod_sendcanceling.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdRw5fYQmI/AAAAAAAAACg/gTNHTKNMtnY/s320/mod_sendcanceling.png" alt="" id="BLOGGER_PHOTO_ID_5338825783779017314" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdRwwBEVrI/AAAAAAAAACY/H4PVY36Hsjo/s1600-h/mod_sendandarchive.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdRwwBEVrI/AAAAAAAAACY/H4PVY36Hsjo/s320/mod_sendandarchive.png" alt="" id="BLOGGER_PHOTO_ID_5338825781235963570" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdRwxC86WI/AAAAAAAAACQ/oM8WtSUdqtQ/s1600-h/mod_detectattachment.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdRwxC86WI/AAAAAAAAACQ/oM8WtSUdqtQ/s320/mod_detectattachment.png" alt="" id="BLOGGER_PHOTO_ID_5338825781512300898" border="0" /&gt;&lt;/a&gt;&lt;br style="clear:both" /&gt;The first and last of these are "Oh ****, I didn't mean to send that yet!" detectors. They're not infallible, but they can save the time it takes to write an embarrassed followup email. The second is a timesaver for clearing the inbox.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; clear:left;"&gt;Google Docs gadget, Google Calendar gadget&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdR8EHAvJI/AAAAAAAAACw/RPtNR5ibxs4/s1600-h/gadget_calendar.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdR8EHAvJI/AAAAAAAAACw/RPtNR5ibxs4/s320/gadget_calendar.png" alt="" id="BLOGGER_PHOTO_ID_5338825975608163474" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdR7235wZI/AAAAAAAAACo/soUEmIxhoN4/s1600-h/gadget_docs.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdR7235wZI/AAAAAAAAACo/soUEmIxhoN4/s320/gadget_docs.png" alt="" id="BLOGGER_PHOTO_ID_5338825972055130514" border="0" /&gt;&lt;/a&gt;&lt;br style="clear:both" /&gt;For quick access to these two services. I also have these on my iGoogle page (with of course the Gmail inbox gadget), but it saves switching tabs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; clear:left;"&gt;Navbar drag and drop, Right-side labels, Right-side chat&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DTOyS3nH0Ho/ShdSOf90RbI/AAAAAAAAADI/4kPI6AYWK7k/s1600-h/mod_rightchat.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://3.bp.blogspot.com/_DTOyS3nH0Ho/ShdSOf90RbI/AAAAAAAAADI/4kPI6AYWK7k/s320/mod_rightchat.gif" alt="" id="BLOGGER_PHOTO_ID_5338826292323435954" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdSOKAD-7I/AAAAAAAAADA/9ZMRsqUA5xI/s1600-h/mod_rightlabels.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://1.bp.blogspot.com/_DTOyS3nH0Ho/ShdSOKAD-7I/AAAAAAAAADA/9ZMRsqUA5xI/s320/mod_rightlabels.gif" alt="" id="BLOGGER_PHOTO_ID_5338826286427274162" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdSOOioYdI/AAAAAAAAAC4/Wici653ly3w/s1600-h/mod_dragon.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdSOOioYdI/AAAAAAAAAC4/Wici653ly3w/s320/mod_dragon.gif" alt="" id="BLOGGER_PHOTO_ID_5338826287646007762" border="0" /&gt;&lt;/a&gt;&lt;br style="clear:both" /&gt;After adding Calendar and docs the left sidebar is getting a bit full, and you may well have to scroll down to get to where you want to go. These gadgets remedy that. It's worth noting that right-side labels and chat don't always respect the ordering set by drag and drop, and the ordering itself has to be done in the left sidebar so the gadgets have to be disabled temporarily if you want to do this.&lt;br /&gt;&lt;br /&gt;I also use &lt;span style="font-weight: bold;"&gt;Custom Label Colors&lt;/span&gt; to help manage the labels pane, and &lt;span style="font-weight: bold;"&gt;Superstars&lt;/span&gt; in the mailboxes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; clear:left;"&gt;Offline&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdEr1Fl_TI/AAAAAAAAABo/73AAiQ_U3Hc/s1600-h/offline.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 80px;" src="http://2.bp.blogspot.com/_DTOyS3nH0Ho/ShdEr1Fl_TI/AAAAAAAAABo/73AAiQ_U3Hc/s320/offline.jpg" alt="" id="BLOGGER_PHOTO_ID_5338811403046616370" border="0" /&gt;&lt;/a&gt;&lt;br style="clear:both" /&gt;Although I practically live online, sometimes I only have my laptop and no wireless access. As long as I remember to sync before I go out this can let me write an email and have it ready to be sent.&lt;br /&gt;&lt;br /&gt;~~~&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;Mark as read&lt;/span&gt; button has been disabled in favour of keyboard shortcuts (General settings). I don't have a need for &lt;span style="font-weight: bold;"&gt;Canned Responses&lt;/span&gt; at the moment but I've heard good things about it, and I continue to use &lt;span style="font-weight: bold;"&gt;Signature tweaks&lt;/span&gt; to prevent my signature disappearing below the stream of previous messages. &lt;span style="font-weight: bold;"&gt;Search autocomplete&lt;/span&gt; has just been enabled for evaluation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-538756146931982172?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/538756146931982172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=538756146931982172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/538756146931982172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/538756146931982172'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/05/gmail-labs-gadgets-and-thier-uses.html' title='Juicy Gmail Labs gadgets and their uses'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DTOyS3nH0Ho/ShdRiKtSqbI/AAAAAAAAACI/Mm3MqRF0jZs/s72-c/mod_titletweaks.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-3660900005213051838</id><published>2009-05-14T09:49:00.007+12:00</published><updated>2010-09-21T14:12:27.935+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre from the farm'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre network'/><title type='text'>Fibre from the Farm</title><content type='html'>There was an article titled "The New Divide" in the April 18th "Your Weekend" insert (not available online*) of the Christchurch Press. It took a look at one way broadband is getting out to New Zealand's largest industry and therefore the one where there is huge potential for productivity improvement - the farmers.&lt;br /&gt;&lt;br /&gt;*I found &lt;a href="http://www.stuff.co.nz/manawatu-standard/news/757181" target="_blank" title="History is in the making in Tararua"&gt;an earlier article from the Manawatu Standard&lt;/a&gt; which touches on some of the points. &lt;br /&gt;&lt;br /&gt;On Monday Close Up also covered the story and their version can now be viewed at TVNZ OnDemand - &lt;a href="http://bit.ly/xjKP1" target="_blank"&gt;Farmers making their own way online&lt;/a&gt;. Chris Barton has also picked up the theme in his &lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;amp;objectid=10572118" target="_blank"&gt;NZHerald column today.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In summary - rather than waiting for Telecom to get around to laying fibre optic cable to their 'low return' rural area farmers have:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;dug in pipes across their properties to a cable laid by the local regional council in partnership with Inspire.net, a local ISP who supply the last bit of the installation for free&lt;/li&gt;&lt;li&gt;and are reaping the economic benefits.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;As an IT worker with a rural background and family* ways of bringing the benefits of the Internet to the farm are of great interest. Some quotes from the Press article to illustrate the benefits:&lt;br /&gt;&lt;blockquote&gt;... had to get online to pay her farm hands and GST. There were the milksolid reports to check, the tanker pick-up schedules to sort, the herd records to update. It's all electronic these days; all part of making New Zealand farming efficient.&lt;br /&gt;&lt;br /&gt;... the internet has become a utility, as essential to daily life as your roads, your water, your electricity supply. His wife needed the web for her studies to be a midwife. The farm needed it for the bed and breakfast they ran as a sideline.&lt;br /&gt;&lt;br /&gt;...The internet should be making life easier for those outside the city. There are now great services like &lt;a href="http://www.fatso.co.nz/" target="_blank"&gt;Fatso, the DVD rental site&lt;/a&gt;, which will post your movies out to you. Not so great, however, if it takes forever to scroll through the selections - "To turn a page to look at what was available, you basically walked out of the room each time, it was that slow,"&lt;/blockquote&gt;*The same background is a big part of why building clean, low footprint, fast loading sites is so important to me.&lt;br /&gt;&lt;br /&gt;I don't believe New Zealand as a country should be accepting this sort of connectivity gap. The Press article points out that a token (my word) 30th of the governments $1.5 billion broadband partnership fund has been set aside to address 'rural' areas. With those same rural areas providing the basis for 60% of our export earnings, even small improvements to their productivity nationwide could make a big difference to all of us. (Even just maybe in the grocery prices.) &lt;br /&gt;&lt;br /&gt;It would be interesting to know where else around New Zealand these 'Fibre from the Farm' initiatives are taking place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-3660900005213051838?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/3660900005213051838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=3660900005213051838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3660900005213051838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3660900005213051838'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/05/fibre-from-farm.html' title='Fibre from the Farm'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6065852487781165555</id><published>2009-04-21T13:35:00.004+12:00</published><updated>2009-04-21T13:46:43.375+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='shout out'/><title type='text'>The Art of Nonconformity (blog), and Achieving Your Childhood Dreams (video)</title><content type='html'>A few days ago I followed a link from one of the increasing number of RSS feeds that I follow to Chris Guillebeau's blog The Art of Nonconformity, specifically to his new free e-publication &lt;a href="http://chrisguillebeau.com/3x5/overnight-success/" target=_"blank"&gt;279 Days to Overnight Success&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Reading it was enough to solidify some thoughts in my head, mostly about online communication and it's part in defining whatever it is I really want to do.&lt;br /&gt;&lt;br /&gt;I was more taken with Chris's earlier piece, &lt;a href="http://chrisguillebeau.com/3x5/a-brief-guide-to-world-domination/" target="_blank"&gt;A Brief Guide to World Domination&lt;/a&gt;. I think everyone should download and read this, but even if you don't there is a video linked to in the Guide which deserves further mention, the last lecture given by one Professor Randy Pausch at Carnegie Mellon University after having being diagnosed with cancer and given a short time to live.&lt;br /&gt;&lt;br /&gt;I don't watch as many major online presentations as I would like because they chew through my data cap. This one is 1hr 16minutes, but I took the plunge anyway and it was worth every minute. This video is the record of one really good communicator and educator distilling the his life into one last show for his friends, family and students. The virtual reality work showcased is a bonus :D&lt;br /&gt;&lt;br /&gt;Here's the link. &lt;b&gt;&lt;a href="http://www.youtube.com/watch?v=ji5_MqicxSo" target="_blank"&gt;http://www.youtube.com/watch?v=ji5_MqicxSo&lt;/a&gt;&lt;/b&gt; . If you have the bandwidth, you have the time (maybe not immediately, but surely in the next few days). &lt;br /&gt;&lt;br /&gt;In the related videos panel there is a lecture also done by Randy on time management. It's of similar length so I'm going to let the cap recover before I watch it, but I will watch it.&lt;br /&gt;&lt;br /&gt;Thanks Chris. And thanks Randy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6065852487781165555?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6065852487781165555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6065852487781165555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6065852487781165555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6065852487781165555'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/04/blog-and-achieving-your-childhood.html' title='The Art of Nonconformity (blog), and Achieving Your Childhood Dreams (video)'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6785544279487729890</id><published>2009-04-19T15:00:00.009+12:00</published><updated>2009-10-02T11:21:46.044+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='WordPress'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Styling first and last list items (and Wordpress)</title><content type='html'>Sometimes a design calls for the first and last items in a list to be styled differently for the others, for example a line or column of overlapping tabs. &lt;br /&gt;&lt;br /&gt;For most modern browsers this is trivial and can be done using the &lt;code&gt;list-class:first-child&lt;/code&gt; and &lt;code&gt;list-class:last-child&lt;/code&gt; psuedoclasses. It's just that Internet Explorer doesn't support these very well.&lt;br /&gt;&lt;br /&gt;If you are hardcoding the list or writing the generation routine it is also simple to generate 'first-item' and 'last-item' classes in the appropriate place.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;ul id=&amp;quot;list-id&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;li class=&amp;quot;ie-list-first list-type-item&amp;quot;&amp;gt;Stuff&amp;lt;/li&amp;gt;&lt;br /&gt;  &amp;lt;li class=&amp;quot;list-type-item&amp;quot;&amp;gt;Stuff&amp;lt;/li&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;li class=&amp;quot;list-type-item&amp;quot;&amp;gt;Stuff&amp;lt;/li&amp;gt;&lt;br /&gt;  &amp;lt;li class=&amp;quot;ie-list-last-last list-type-item&amp;quot;&amp;gt;Stuff&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;When templating for an existing CMS it may not be desirable to dig deeply enough to customise the code. For example WordPress's wp_list_pages() function (with appropriate parameters) returns something like this:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;li class=&amp;quot;page_item page-item-4 current_page_item&amp;quot;&amp;gt;Page link&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li class=&amp;quot;page_item page-item-9&amp;quot;&amp;gt;Page link&amp;lt;/li&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;li class=&amp;quot;page_item page-item-13&amp;quot;&amp;gt;Page link&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li class=&amp;quot;page_item page-item-15&amp;quot;&amp;gt;Page link&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li class=&amp;quot;page_item page-item-34&amp;quot;&amp;gt;Page link&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li class=&amp;quot;page_item page-item-25&amp;quot;&amp;gt;Page link&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;I spent some time following the function trail before deciding it was better to add the classes after the string was generated. Fortunately if you set 'echo=0' wp_list_pages() will return the string to a variable. After that it's just a matter of string substitution - first and last incidence of class=&amp;quot; . (This might get a bit trickier if you're using nested lists, but I try and keep depth=1 if possible).&lt;br /&gt;&lt;br /&gt;It turned out the easiest way to do this was with a preg_replace - but it still requires a little trickery because you can't tell preg_replace to start from the &lt;em&gt;end&lt;/em&gt; of a string. Instead you have to reverse everything, do the replacement, and then reverse everything again.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;//get li string&lt;br /&gt;$pages = wp_list_pages(&amp;#039;title_li=&amp;amp;depth=1&amp;amp;echo=0&amp;#039; );&lt;br /&gt;&lt;br /&gt;//add styling identifiers for first item&lt;br /&gt;$pages = preg_replace(&amp;#039;/class=&amp;quot;/&amp;#039;,&amp;#039;class=&amp;quot;ie-list-first &amp;#039;, $pages, 1); //note space on end of replacement string&lt;br /&gt;&lt;br /&gt;//add styling identifiers for last item&lt;br /&gt;$reversedString = strrev($pages);&lt;br /&gt;$reversedSearch = &amp;#039;/&amp;#039;.strrev(&amp;#039;class=&amp;quot;&amp;#039;).&amp;#039;/&amp;#039;;&lt;br /&gt;$endClass = strrev(&amp;#039;class=&amp;quot;ie-list-last &amp;#039;); //note space on end&lt;br /&gt;&lt;br /&gt;$pages = strrev(preg_replace($reversedSearch,$endClass, $reversedString, 1));&lt;br /&gt;&lt;br /&gt;//output&lt;br /&gt;echo $pages;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;I make sure the ie-list class is first because it makes it easier to call in your IE-specific stylesheet without worrying that another CMS generated class will get precedence.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6785544279487729890?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6785544279487729890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6785544279487729890' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6785544279487729890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6785544279487729890'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/04/styling-first-and-last-list-items-and.html' title='Styling first and last list items (and Wordpress)'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7797873233931750940</id><published>2009-04-14T08:25:00.003+12:00</published><updated>2009-04-14T08:45:50.177+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='templates'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='WordPress'/><title type='text'>Inserting the latest post into some other page in WordPress</title><content type='html'>Over the weekend I started exploring WordPress to see if it would suit for a client. &lt;br /&gt;Elements of the design were the main blog entries on a different 'page' to the homepage but the most recent post displayed below the blurb on the homepage.&lt;br /&gt;&lt;br /&gt;WordPress supports the first option from the administration panel, but the second took a little work in the template. To get the desired effect I pulled together the advice from &lt;a href="http://forum.bytesforall.com/showthread.php?t=837" target="_blank" /&gt;this bytesforall forum thread&lt;/a&gt; (thank you Google) to get the post, and the &lt;a href="http://codex.wordpress.org/Template_Tags/the_content#Overriding_Archive.2FSingle_Page_Behavior" target="_blank"&gt;WordPress documentation&lt;/a&gt; on overriding the single page behaviour of the the_content() template tag. &lt;br /&gt;&lt;br /&gt;The end result looked a bit like this - after the if(have_posts()) has completed:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;?php if ( is_front_page() ) : &lt;br /&gt; $my_query = new WP_Query(&amp;#039;showposts=1&amp;#039;);&lt;br /&gt; while ($my_query-&amp;gt;have_posts()) : $my_query-&amp;gt;the_post(); &lt;br /&gt;?&amp;gt;&lt;br /&gt; &amp;lt;div &amp;lt;?php post_class() ?&amp;gt; id=&amp;quot;post-&amp;lt;?php the_ID(); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;quot;&amp;lt;?php the_permalink() ?&amp;gt;&amp;quot; rel=&amp;quot;bookmark&amp;quot; title=&amp;quot;Permanent Link to &amp;lt;?php the_title_attribute(); ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;small&amp;gt;&amp;lt;?php the_time(&amp;#039;F jS, Y&amp;#039;) ?&amp;gt; &amp;lt;!-- by &amp;lt;?php the_author() ?&amp;gt; --&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;div class=&amp;quot;entry&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;?php &lt;br /&gt;  // normally the &amp;lt;!---more--&amp;gt; command is ignored on single pages - this forces it&lt;br /&gt;   global $more;&lt;br /&gt;   $more=0;&lt;br /&gt;   the_content(&amp;#039;Read the rest of this entry &amp;amp;raquo;&amp;#039;); &lt;br /&gt;?&amp;gt;&lt;br /&gt;   &amp;lt;/div&amp;gt;&lt;br /&gt;   &amp;lt;p class=&amp;quot;postmetadata&amp;quot;&amp;gt;&amp;lt;?php the_tags(&amp;#039;Tags: &amp;#039;, &amp;#039;, &amp;#039;, &amp;#039;&amp;lt;br /&amp;gt;&amp;#039;); ?&amp;gt; Posted in &amp;lt;?php the_category(&amp;#039;, &amp;#039;) ?&amp;gt; | &amp;lt;?php edit_post_link(&amp;#039;Edit&amp;#039;, &amp;#039;&amp;#039;, &amp;#039; | &amp;#039;); ?&amp;gt;  &amp;lt;?php comments_popup_link(&amp;#039;No Comments &amp;amp;#187;&amp;#039;, &amp;#039;1 Comment &amp;amp;#187;&amp;#039;, &amp;#039;% Comments &amp;amp;#187;&amp;#039;); ?&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;?php &lt;br /&gt; endwhile; &lt;br /&gt;endif; ?&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This weekends experiment with WordPress has a few more posts lined up as well. I found it easy to install and template but rather slow to load.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7797873233931750940?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7797873233931750940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7797873233931750940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7797873233931750940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7797873233931750940'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/04/inserting-latest-post-into-some-other.html' title='Inserting the latest post into some other page in WordPress'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-9104727904986294129</id><published>2009-03-31T09:08:00.006+13:00</published><updated>2009-03-31T09:48:23.606+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='layout'/><category scheme='http://www.blogger.com/atom/ns#' term='rule of thirds'/><title type='text'>My rule of thirds for 1024 site width</title><content type='html'>The Rule of Thirds is an approximation used for applying the "Golden Ratio" to design, as explained in this excerpt from &lt;a href="http://www.sitepoint.com/article/principles-beautiful-web-design/3/" target="_blank" title="Article on SitePoint.com"&gt;The Principles of Beautiful Web Design&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cameronmoll.com/archives/001220.html" target="_blank" title="Optimal width for 1024px resolution? (2006)"&gt;Cameron Moll recommended using 960px&lt;/a&gt; as the width of your content for divisibility reasons. I go slightly higher to 972px giving the following whole numbers.&lt;br /&gt;&lt;br /&gt;Split 972px -&gt; 648px and 324px&lt;br /&gt;Split 324px -&gt; 216px and 108px&lt;br /&gt;Split 108px -&gt; 72px and 36px&lt;br /&gt;Split 36px -&gt; 24px and 12px&lt;br /&gt;Split 12px -&gt; 8px and 4px&lt;br /&gt;&lt;br /&gt;In 2009 the question of "What can we safely design for" has become more complicated with the rise of both the smaller mobile browser and ever larger/higher resolution monitors. Larger monitors however have led to more windowed browsing and mobile browsers are best targeted with their own style sheets.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-9104727904986294129?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/9104727904986294129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=9104727904986294129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/9104727904986294129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/9104727904986294129'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/03/my-rule-of-thirds-for-1024-site-width.html' title='My rule of thirds for 1024 site width'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-310221982759069650</id><published>2009-03-26T13:44:00.003+13:00</published><updated>2009-03-26T14:00:15.189+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><title type='text'>IETester - when you need another version of Internet Explorer</title><content type='html'>Today I found out the hard way ("the site looks terrible in my browser!") that when I reinstalled Windows XP a little while ago it reverted to IE6. &lt;br /&gt;&lt;br /&gt;Scrambling around to get a copy of Internet Explorer 7 working &lt;a href="http://www.my-debugbar.com/wiki/IETester/HomePage" target="_blank"&gt;IETester&lt;/a&gt; was a lifesaver. IETester is a free tool which lets you run multiple versions of Internet Explorer in the same tabbed window.&lt;br /&gt;&lt;br /&gt;I'd checked out this application previously and considered it worth leaving on my hard drive. Now with IE8 out there as well I expect I will be using it a lot more. After all, &lt;a href="http://www.w3schools.com/browsers/browsers_stats.asp" target="_blank" title="w3schools stats"&gt;about 20% of people still seem to use IE6&lt;/a&gt; as of the date of this post so that's three substantially different versions of Internet Explorer to test - having one on the laptop and one on the PC doesn't cut it any more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-310221982759069650?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/310221982759069650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=310221982759069650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/310221982759069650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/310221982759069650'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/03/ietester-when-you-need-another-version.html' title='IETester - when you need another version of Internet Explorer'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6414179121604663274</id><published>2009-03-18T12:18:00.004+13:00</published><updated>2009-03-18T12:37:47.673+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Using responseXML - remember Content type text/xml</title><content type='html'>Content sent in response to an ajax request may be "unstructured" (plain text) or structured (&lt;abbr title="eXtensible Markup Language"&gt;XML&lt;/abbr&gt;). To the eye there may be no difference (example: &lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Item1&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;item2&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; could legitimately be either) but browsers rely on the Content-type header to be sure, defaulting to text/html. &lt;br /&gt;&lt;br /&gt;If you don't specify xml the object returned by the responseXML property of the response may be null. (Opera seems to cope, of the browsers I tested during debugging). To do this in a php script send &lt;code&gt;header('Content-type: text/xml')&lt;/code&gt; before the actual content of the response.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6414179121604663274?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6414179121604663274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6414179121604663274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6414179121604663274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6414179121604663274'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/03/using-responsexml-remember-content-type.html' title='Using responseXML - remember Content type text/xml'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5639522192924336656</id><published>2009-03-06T10:25:00.006+13:00</published><updated>2009-03-06T10:42:08.380+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><title type='text'>Display blogger widgets only on particular page types</title><content type='html'>It's helpful to be able to customise your widgets to particular page types, especially with limited sidebar space. For example there is really no need for my reading list/blogroll to be displayed against every individual article, or anywhere except the main page.&lt;br /&gt;&lt;br /&gt;The blogger documentation describes a method using the pageType attribute for widgets, which I found out the hard way doesn't actually work. A quick search of the &lt;a href="http://groups.google.com/group/blogger-help" target="_blank"&gt;blogger help group&lt;/a&gt; revealed this is a well known and often encountered problem. Bad Blogger!&lt;br /&gt;&lt;br /&gt;So I've used a method from &lt;a href="http://bguide.blogspot.com/2008/03/limiting-widgets-to-specific-pages.html" target="_blank"&gt;The Blogger Guide&lt;/a&gt; using a conditional statement to only display that element on the 'index' page. &lt;br /&gt;&lt;br /&gt;As I wanted to exclude the title as well as the content I learnt the following about placing the conditional (&lt;code&gt;&amp;lt;b: if &amp;gt;&lt;/code&gt;) statement:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You can't wrap an entire widget in a conditional&lt;/li&gt;&lt;li&gt;the earliest a conditional can appear in the widget code is after the &lt;code&gt;&amp;lt;b:includable &amp;gt;&lt;/code&gt; tag.&lt;/li&gt;&lt;/ul&gt;Happily Blogger fails to save the template &lt;em&gt;and&lt;/em&gt; displays a helpful description of what is in the wrong place if you get either of these wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5639522192924336656?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5639522192924336656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5639522192924336656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5639522192924336656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5639522192924336656'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/03/display-blogger-widgets-only-on.html' title='Display blogger widgets only on particular page types'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-283485201352301292</id><published>2009-03-04T12:39:00.003+13:00</published><updated>2009-03-04T13:18:09.561+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='progressive enhancement'/><title type='text'>The addBehaviour function</title><content type='html'>One of the functions in my ongoing series on &lt;a href="http://webknight-nz.blogspot.com/2009/02/progessively-sending-to-post-get-should.html"&gt;GET should always be safe&lt;/a&gt; I've called addBehavior. It's representative of the basic principle of progressive enhancement - add advanced functionality after the page loads, if the browser supports it.&lt;br /&gt;&lt;br /&gt;Obviously if the browser doesn't support JavaScript the function just won't be called. I'll step through the rest quickly.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;function addBehaviour()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var anchors = document.getElementsByTagName("a");&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt; 'anchors' is returned as an array containing references to every &amp;lt;a&amp;gt; element in the page - this includes links but also empty anchors used as link targets. &lt;br /&gt;&lt;br /&gt;If you're thinking of reusing it outside this function remember that it will not include elements dynamically added later.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;nbsp;for (var i = 0; i &lt; anchors.length; i++) &lt;br /&gt;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;if (anchors[i].getAttribute("rel") == "delete")&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt; For each &amp;lt;a&amp;gt; element in the page (anchors array), see if the "rel" attribute is "delete" (our flag for a link that needs the delete behaviour added). Another commonly used attribute is "class", which doubly serves to mark the element for styling.&lt;br /&gt;&lt;br /&gt; It needn't be the case that only one flag is contained in the attribute, in which case the comparison needs to be a little more complicated and use the &lt;a href="http://www.w3schools.com/jsref/jsref_search.asp" target="_blank" title="w3schools.com introduces the search() method"&gt;search() method&lt;/a&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;attachEventListener(anchors[i], "click", confirmDelete, true);&lt;br /&gt;&amp;nbsp;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt; Use SitePoint's handy attachEventListener() function to add the equivalent of &lt;em&gt;onclick="confirmDelete()" to each anchor.&lt;/em&gt; confirmDelete() is my function for checking with the user that they actually want to delete the item and if so populating and triggering the POST form.&lt;br /&gt;&lt;br /&gt;I would typically add the code for attaching any other behaviour required of an &amp;lt;a&amp;gt; element at this stage of the function so as to reuse the anchors array efficiently. This may be better done in other parts of the code depending on the circumstance.&lt;br /&gt; &lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;nbsp;}&lt;br /&gt;} &lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-283485201352301292?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/283485201352301292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=283485201352301292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/283485201352301292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/283485201352301292'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/03/addbehaviour-function.html' title='The addBehaviour function'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1777990037735775323</id><published>2009-02-22T16:18:00.010+13:00</published><updated>2009-02-22T17:25:57.831+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><title type='text'>Limit labels gadget on Blogger</title><content type='html'>The labels widget (or gadget) for the Blogger sidebar has certain limitations. By default it shows all your labels, and there is no quick way of limiting this in the settings. Unless your blogging topic is very well defined it doesn't take very long before there is a long string of labels down the side of the page, many with relatively few posts. Wouldn't it be better if you could only display your most-used labels on your main page?&lt;br /&gt;&lt;br /&gt;One easy alternative is to use the Links List gadget to manually enter links to the specific pages for your most common labels. This is the ideal solution if you want to highlight specific tags in your sidebar, but not so much if you still want them sorted and updated over time as you have to review and do this yourself.&lt;br /&gt;&lt;br /&gt;Fortunately it is possible to hack the Labels widget, or any of the other gadgets in your template layout. Here is an &lt;a href="http://help.blogger.com/bin/answer.py?hl=en&amp;answer=46995" target="_blank" title="Widget tags for layouts"&gt;article from the blogger knowledge base&lt;/a&gt; talking about the basics.&lt;br /&gt;&lt;br /&gt;So, to limit your labels widget to only show the subset with more than some number of posts attached:&lt;br /&gt;1. Go to the Edit tab of your blogger control panel and from there to Edit HTML&lt;br /&gt;2. Check the box next to "Expand Widget Templates"&lt;br /&gt;3. Scroll down down down until you find the code for the labels widget. It should look a bit like: &lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;b:widget id='Label1' locked='false' title='Labels' type='Label'&amp;gt;&lt;br /&gt;//(some bits we're not interested in right now)&lt;br /&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;b:loop values='data:labels' var='label'&amp;gt;&lt;br /&gt;&amp;lt;b:if cond='data:blog.url == data:label.url'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span expr:dir='data:blog.languageDirection'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;data:label.name/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;b:else/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;a expr:dir='data:blog.languageDirection' expr:href='data:label.url'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;data:label.name/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/b:if&amp;gt;&lt;br /&gt;&amp;lt;span dir='ltr'&amp;gt;(&amp;lt;data:label.count/&amp;gt;)&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;//(more bits we're not interested in right now)&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;All we actually have to do is add another if statement into the loop, like so:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;b:loop values='data:labels' var='label'&amp;gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;b:if cond='data:label.count &amp;gt; 20'&amp;gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&lt;br /&gt;//(unchanged)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/li&amp;gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;/b:if&amp;gt;&lt;/strong&gt;&lt;br /&gt;&amp;lt;/b:loop&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/blockquote&gt; &lt;br /&gt;I've used 20 as an arbitrary number which can be changed to suit the label counts on your blog. &lt;br /&gt;&lt;br /&gt;If you've recently started blogging, you may still feel that the displayed counts are discouragingly low (for yourself or for your visitors). While you're here you can suppress them until you have a more respectable total by deleting or (more safely, unless you're really sure you'll remember how to put it back) html-commenting out that line of code as I've done here:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;!-- &amp;lt;span dir='ltr'&amp;gt;(&amp;lt;data:label.count/&amp;gt;)&amp;lt;/span&amp;gt; --&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;It would be nice to still have a list of all your tags somewhere for visitors to look at. Unfortunately you can't put a gadget directly into a post and Blogger doesn't seem to have a page that does this by default, so I'm still investigating that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1777990037735775323?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1777990037735775323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1777990037735775323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1777990037735775323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1777990037735775323'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/02/limit-labels-gadget-on-blogger.html' title='Limit labels gadget on Blogger'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8435422251027160042</id><published>2009-02-22T15:18:00.004+13:00</published><updated>2009-02-22T15:37:16.165+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Pass a prefilled array from an html form to a php script</title><content type='html'>Situation: A client has a handful of products that they would like visitors to be able to order - not enough to be worth installing a shopping cart. They already use a &lt;acronym title="Content Management System"&gt;CMS&lt;/acronym&gt; to manage their website.&lt;br /&gt;&lt;br /&gt;Problem: A custom process script is required to process the order and possibly payment options, but we don't want to have to update the script every time the products page is updated.&lt;br /&gt;&lt;br /&gt;Solution: Pass all the required information for each product to the processing script through a form using arrays. The client may only have to be taught how to assign names and ids to form fields in their CMS, and adhere to the naming conventions used in the script. &lt;br /&gt;&lt;br /&gt;You can tell a php script that a POST element is part of an array of values by naming the element with square brackets i.e. "&lt;i&gt;name&lt;/i&gt;[]". I often use this with check boxes or other situations where visitor can make several selections from a list, rather than having to give each element a unique name.&lt;br /&gt;&lt;br /&gt;Vitally to this solution, you can make this an associative array by including the array keys in the element name i.e. "&lt;i&gt;name&lt;/i&gt;[&lt;b&gt;key&lt;/b&gt;]".&lt;br /&gt;&lt;br /&gt;The form fields we will use are:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input name=&amp;quot;productName[basic]&amp;quot; id=&amp;quot;productName[basic]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;Basic Product&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;input name=&amp;quot;productPrice[basic]&amp;quot; id=&amp;quot;productPrice[basic]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;select name=&amp;quot;productQuantity[basic]&amp;quot; id=&amp;quot;productQuantity[basic]&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;0&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;1&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;2&amp;quot;&amp;gt;2&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;3&amp;quot;&amp;gt;3&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name=&amp;quot;productName[luxury]&amp;quot; id=&amp;quot;productName[luxury]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;Luxury product&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;input name=&amp;quot;productPrice[luxury]&amp;quot; id=&amp;quot;productPrice[luxury]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;1000&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;select name=&amp;quot;productQuantity[luxury]&amp;quot; id=&amp;quot;productQuantity[luxury]&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;0&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;1&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;2&amp;quot;&amp;gt;2&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;3&amp;quot;&amp;gt;3&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;Note: The ids are not necessary but it's good practice to include them. Often in this scenario they are used with a javascript function to update the page with the total amount to be paid.&lt;br /&gt;&lt;br /&gt;The php which receives and process this looks a bit like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;$productName = $_POST["productName"];&lt;br /&gt;$productPrice = $_POST["productPrice"];&lt;br /&gt;$productQuantity = $_POST["productQuantity"]; &lt;br /&gt;&lt;br /&gt;$subTotals = array();&lt;br /&gt;$total = 0;&lt;br /&gt;$productString = "";&lt;br /&gt;&lt;br /&gt;foreach($productName as $id =&amp;gt; $prodTitle)&lt;br /&gt;{&lt;br /&gt; if(!isset($productPrice[$id]) || !isset($productQuantity[$id]) )&lt;br /&gt; {&lt;br /&gt;  //error handling here&lt;br /&gt;  continue;&lt;br /&gt; }&lt;br /&gt; $total += $subTotals[$id] = $productPrice[$id]*$productQuantity[$id];&lt;br /&gt; if($productQuantity[$id]&gt;0)&lt;br /&gt; {&lt;br /&gt;  $productString .= "\$ {$subTotals[$id]} : $prodTitle @ \${$productPrice[$id]} x {$productQuantity[$id]}\n";&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if($productString == "")&lt;br /&gt;{&lt;br /&gt; //no products selected&lt;br /&gt; //error handling here&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; $productString .= "---\n\$ $total : Total";&lt;br /&gt; echo nl2br($productString); //test&lt;br /&gt; // process order&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;You can see it all in action on &lt;a href="http://www.webknight.co.nz/BlogDownloads/shop-array.html" rel="noindex nofollow" /&gt;this sample page&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;I also find this a useful middle ground between whitelisting the fields received by the script and leaving it completely open. The difference between:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;foreach($_POST as $field =$gt; $value)&lt;br /&gt;{&lt;br /&gt; //so we can use values later in the script &lt;br /&gt; $$field = clean($value); //define a variable for each element in $_POST, very insecure&lt;br /&gt;}&lt;br /&gt;//later in script&lt;br /&gt;$string = "field1: $field1,  field 2: $field2...";&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;and a series of defined blocks of the form&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;$customer = $_POST['customer'];&lt;br /&gt;foreach($customer as $field =&amp;gt; $value)&lt;br /&gt;{&lt;br /&gt; $value = clean($value) //just in case&lt;br /&gt; $customerString = "$field: $value,";&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;is a not insignificantly lower risk of having a global setting messed with by a hostile script in the first instance, and variables pregrouped for processing in the second. In the opening scenario this is used to let the site owner determine and change what customer information is gathered as part of the order.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8435422251027160042?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8435422251027160042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8435422251027160042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8435422251027160042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8435422251027160042'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/02/pass-prefilled-array-from-html-form-to.html' title='Pass a prefilled array from an html form to a php script'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7990403459647618307</id><published>2009-02-11T10:33:00.006+13:00</published><updated>2009-02-11T10:47:51.121+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blender'/><title type='text'>Blender: an equilateral triangle</title><content type='html'>One of the first things that frustrated me about &lt;a href="http://www.blender.org/" target="_blank"&gt;Blender&lt;/a&gt; was the inability to quickly add a regular polygon other than a square. For the faces of my 20-sided die (or icosahedron) equilateral triangles were needed. Here's the quick way of making an equilateral triangle that I eventually used. (I am assuming basic familiarity with creating, rotating and selecting parts of mesh objects.)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DTOyS3nH0Ho/SZHzhWa25gI/AAAAAAAAABY/cwdtSDkj5iM/s1600-h/cube-all.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 320px;" src="http://3.bp.blogspot.com/_DTOyS3nH0Ho/SZHzhWa25gI/AAAAAAAAABY/cwdtSDkj5iM/s320/cube-all.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5301285990671246850" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ol type="1"&gt;&lt;li&gt;Add the basic cube to your scene.&lt;/li&gt;&lt;li&gt;Tab into edit mode then select any vertex and delete it. Rotate the cube so you can clearly see the three vertices which were adjacent.&lt;/li&gt;&lt;li&gt;Select these three vertices and press the F key to make a face between them. Voila, equilateral triangle!&lt;/li&gt;&lt;li&gt;Select and delete the remaining unwanted vertices. You can now grab, rotate and scale your triangle to wherever it needs to be.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7990403459647618307?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7990403459647618307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7990403459647618307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7990403459647618307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7990403459647618307'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/02/blender-equilateral-triangle.html' title='Blender: an equilateral triangle'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DTOyS3nH0Ho/SZHzhWa25gI/AAAAAAAAABY/cwdtSDkj5iM/s72-c/cube-all.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7853578708538431030</id><published>2009-02-11T10:11:00.007+13:00</published><updated>2009-02-11T10:32:41.155+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blender'/><title type='text'>Lock Blender's view to an object</title><content type='html'>&lt;a href="http://www.blender.org/" target="_blank"&gt;Blender&lt;/a&gt; is an open-source &lt;abbr title="three dimensional"&gt;3D&lt;/abbr&gt; design and rendering application which I recently started experimenting with. Graphic work isn't my strong point at the best of time and Blender does not necessarily use windows-standard conventions (which is fine) so there have been several hours of frustration and cursing involved along the steep learning curve.&lt;br /&gt;&lt;br /&gt;On the way to producing something I was happy with for my first project I learnt many things the hard way some of which will make an appearance in this blog as future posts. On of the best things I discovered (late in the piece) was how to lock the view to a particular object which has the effect of seeming to rotate the object rather than the viewpoint. This can make achieving many perspectives much easier.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DTOyS3nH0Ho/SZHv3tIkbII/AAAAAAAAABI/mfFkNtIzZHI/s1600-h/view-locking.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 154px;" src="http://2.bp.blogspot.com/_DTOyS3nH0Ho/SZHv3tIkbII/AAAAAAAAABI/mfFkNtIzZHI/s320/view-locking.jpg" alt="" id="BLOGGER_PHOTO_ID_5301281976679165058" border="0" /&gt;&lt;/a&gt;To do this pull up the View Properties window and then enter the name of the object to focus on in the field below the View Locking: heading. (The name of an object appears in the lower left of the 3D window when the object is selected).&lt;br /&gt;&lt;br /&gt;Below is the not-quite-perfect-but-close-enough result of my first project, a logo for the &lt;a href="http://gameathon.ning.com/" target="_blank"&gt;Gameathon&lt;/a&gt; project.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DTOyS3nH0Ho/SZHyTWl-qNI/AAAAAAAAABQ/CBjiUAGNTnE/s1600-h/d20-all-white-400x400.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 320px;" src="http://3.bp.blogspot.com/_DTOyS3nH0Ho/SZHyTWl-qNI/AAAAAAAAABQ/CBjiUAGNTnE/s320/d20-all-white-400x400.png" alt="" id="BLOGGER_PHOTO_ID_5301284650688096466" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7853578708538431030?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7853578708538431030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7853578708538431030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7853578708538431030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7853578708538431030'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/02/lock-blenders-view-to-object.html' title='Lock Blender&apos;s view to an object'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DTOyS3nH0Ho/SZHv3tIkbII/AAAAAAAAABI/mfFkNtIzZHI/s72-c/view-locking.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8736758439567367572</id><published>2009-02-05T12:43:00.006+13:00</published><updated>2009-02-05T14:27:25.910+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='progressive enhancement'/><title type='text'>Progessively sending to POST - GET should always be safe part I</title><content type='html'>It's taken me almost a month to get to the follow up to my original post on &lt;a href="http://webknight-nz.blogspot.com/2009/01/get-should-always-be-safe-and.html"&gt;GET should always be safe&lt;/a&gt;. This is because when I started delving into the best ways of dynamically adding events to html links I discovered how little I really knew about it.&lt;br /&gt;&lt;br /&gt;Eventually this article on &lt;a href="http://www.sitepoint.com/article/javascript-from-scratch/" target="_blank" title="Script Smarter: Quality JavaScript from Scratch [SitePoint]"&gt;writing quality javascript&lt;/a&gt; from SitePoint taught me much of what was needed. I've copy-pasted several of their functions and won't be covering them directly. Everything I've used is in the source of &lt;a href="http://www.webknight.co.nz/BlogDownloads/GETSafe.html" rel="noindex nofollow" target="_blank"&gt;this html file&lt;/a&gt;, with references. &lt;br /&gt;&lt;br /&gt;To recap: we want a way of producing a lot of 'Delete' links on a page which will submit by POST rather than GET. We do not want to clutter our page with a separate form for every link, and the links still need to work if JavaScript is unavailable.&lt;br /&gt;&lt;br /&gt;The basics that we need are:&lt;br /&gt;1. A link that will work by itself. We can use GET for this, as long as the resulting page is a request for confirmation and not a delete process.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;   &amp;lt;a href=&amp;quot;http://www.mysite.com/delete.php?id=123&amp;quot; rel=&amp;quot;delete&amp;quot; &amp;gt; Delete &amp;lt;/a&amp;gt; &lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;Note the &lt;em&gt;rel&lt;/em&gt; attribute, which is what we use to target links of this type for adding behaviours. &lt;br /&gt;&lt;br /&gt;2. A POST form which will send one record id directly off to the deletion script.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;form action=&amp;quot;delete.php&amp;quot; method=&amp;quot;post&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot; name=&amp;quot;delForm&amp;quot; id=&amp;quot;delForm&amp;quot;&amp;gt;&lt;br /&gt; &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;delId&amp;quot; id=&amp;quot;delId&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;The form consists of only one hidden field, so generally will not be visible on the page at all. The value is by default empty, to avoid any unfortunate accidents. Both the form and the field have ids that we can use to reference them later.&lt;br /&gt;The alert will note that it goes to the same page as the link. This is because I intend to have that page react based on what sort of request it receives.&lt;br /&gt;3. Some Javascript to extract the record id from the link, populate the form field and submit the form.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;function confirmDelete(event){&lt;br /&gt;//what are we doing?&lt;br /&gt;&amp;nbsp;if (typeof event == "undefined") &lt;br /&gt;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;event = window.event; &lt;br /&gt;&amp;nbsp;} &lt;br /&gt;//what are we doing it to &lt;br /&gt;&amp;nbsp;var target = getEventTarget(event); // SitePoint function &lt;br /&gt;&amp;nbsp;while(target.nodeName.toLowerCase() != "a") &lt;br /&gt;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;target = target.parentNode; &lt;br /&gt;&amp;nbsp;}&lt;br /&gt; &lt;br /&gt;/* if your script passes multiple variables in the query string this may need to be more complicated.*/&lt;br /&gt;// extract the record id&lt;br /&gt;&amp;nbsp;var del_id = target.getAttribute("href"); &lt;br /&gt;&amp;nbsp;var cut = del_id.lastIndexOf("=")+1; &lt;br /&gt;&amp;nbsp;del_id = del_id.substr(cut);&lt;br /&gt; &lt;br /&gt;&amp;nbsp;if(confirm('Delete record '+del_id+'?'))&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;// fill out and submit form&lt;br /&gt;&amp;nbsp;&amp;nbsp;stopDefaultAction(event); // SitePoint function &lt;br /&gt;&amp;nbsp;&amp;nbsp;document.getElementById('delId').value = del_id;&lt;br /&gt;&amp;nbsp;&amp;nbsp;document.getElementById('delForm').submit();&lt;br /&gt;&amp;nbsp;&amp;nbsp;return false;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;// abort&lt;br /&gt;&amp;nbsp;&amp;nbsp;stopDefaultAction(event); // SitePoint function &lt;br /&gt;&amp;nbsp;&amp;nbsp;return false;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;I'll break this script down further in a later post. Getting this bit to work was what really tripped me up - I needed to learn about the method contained in stopDefaultAction().&lt;br /&gt;&lt;br /&gt;4. Some JavaScript to add confirmDelete() to the link's onclick event.  &lt;br /&gt;To do this I used SitePoint's addLoadListener() function to call a function I've called addBehaviour() for convenience&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;function addBehaviour()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var anchors = document.getElementsByTagName("a");&lt;br /&gt;&amp;nbsp;for (var i = 0; i &lt; anchors.length; i++) &lt;br /&gt;&amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;if (anchors[i].getAttribute("rel") == "delete")&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;attachEventListener(anchors[i], "click", confirmDelete, true);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;/* add actions for other 'rel's in consecutive if statements. For instances with multiple identifiers in a given rel use search() or some other partial match technique in the if statement */&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;} &lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;I'll quickly go over this function in a later post as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8736758439567367572?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8736758439567367572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8736758439567367572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8736758439567367572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8736758439567367572'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/02/progessively-sending-to-post-get-should.html' title='Progessively sending to POST - GET should always be safe part I'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-3345618209651656268</id><published>2009-01-27T15:18:00.007+13:00</published><updated>2009-06-12T21:12:05.108+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='accessibility'/><category scheme='http://www.blogger.com/atom/ns#' term='not code'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='screen readers'/><title type='text'>Use of screen readers demonstrated on Youtube</title><content type='html'>Today's post starts with this video on the &lt;a href="http://www.youtube.com/watch?v=AmUPhEVWu_E" target="_blank"&gt;Importance of HTML Headings for Accessibility&lt;/a&gt; which I saw today via &lt;a href="http://www.456bereastreet.com/archive/200901/headings_heading_hierarchy_and_document_outlines/" target="_blank"&gt;456 Berea Street&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you browse the "Related items" of this video you'll see and more importantly hear quite a number of examples of screen reader use, demonstrating sites done both well and poorly.&lt;br /&gt;&lt;br /&gt;Many people when they design a website don't think about how it will look in anything other than a standard desktop web browser. With the proliferation of small screen browsing devices (mobile phones, Blackberries, the iPhone) over the past couple of years differing visual options are starting to be give more weight, but non-visual browsers and those who use them are still neglected.&lt;br /&gt;&lt;br /&gt;It's a fortunate thing that search engines are non-visual browsers, because structuring a page such that a search engine can easily understand it by clearly marking up headings, using relevant link text and suitable descriptive alt text for images will also go a long way towards making the site easier to use for those who have to rely on listening to it (or feeling it for those who use Braille interfaces).&lt;br /&gt;&lt;br /&gt;I've been building pages with this in mind for some time, but as a fully sighted user I still have trouble ... visualising isn't really the right word ... how a page is going to turn out. That is one of the things that makes videos like this such a valuable resource.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-3345618209651656268?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/3345618209651656268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=3345618209651656268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3345618209651656268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3345618209651656268'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/01/use-of-screen-readers-demonstrated-on.html' title='Use of screen readers demonstrated on Youtube'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8587481789631098126</id><published>2009-01-26T16:22:00.003+13:00</published><updated>2009-01-26T17:02:37.782+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Firefox settings to allow invalid certificates</title><content type='html'>Firefox 3.1 has become very tough on 'secure' sites using invalid or self-referencing security certificates. Joe User just isn't going to be allowed in. There are nice posts about the issues from a developer &lt;a href="http://blog.johnath.com/2007/10/11/todo-break-internet/" target="_blank" title="meandering wildly: todo break internet"&gt;here&lt;/a&gt; and &lt;a href="http://blog.johnath.com/2008/11/06/ssl-error-pages-in-firefox-31/" target="_blank" title="meandering wildly: ssl error pages in firefox 3 point 1"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a bit tough on developers, because domain management systems like &lt;a href="http://www.parallels.com/products/plesk/" target="_blank" title="Parallels Plesk panel overview"&gt;PLESK&lt;/a&gt; which we deal with a lot typically put their administration panel behind a self-authorising certificate. Fortunately there is a way, or Firefox would be losing some popularity with the development community. Still, you need to know what you are doing. It took me some googling and some experimentation.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Please don't try this unless you are comfortable with all the implications of messing around 'under the hood' of Firefox, and also know when it is and isn't safe (or how to find out) to accept a risky security certificate.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Googling eventually led me to this &lt;a href="http://kb.mozillazine.org/Browser.xul.error_pages.expert_bad_cert" target="_blank"&gt;article from the mozillazine knowledge base&lt;/a&gt; about the setting &lt;strong&gt;browser.xul.error_pages.expert_bad_cert&lt;/strong&gt;, which I set to 'true'. (type about:config in your Firefox address bar, then type xul into the filter to find it. Select 'toggle' from the context (right-click) menu to change it). By itself this did nothing, until I also set the nearby &lt;strong&gt;browser.xul.error_pages.enabled&lt;/strong&gt; to 'true'. Further experimentation proved that the latter was the important one.&lt;br /&gt;&lt;br /&gt;Once this is done instead of just displaying an alert when it finds an invalid security certificate Firefox will display a page from which you can&lt;br /&gt;&lt;ul&gt;&lt;li&gt;examine the certificate and &lt;/li&gt;&lt;li&gt;proceed to list it as an exception if you &lt;em&gt;know it to be safe&lt;/em&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8587481789631098126?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8587481789631098126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8587481789631098126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8587481789631098126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8587481789631098126'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/01/firefox-settings-to-allow-invalid.html' title='Firefox settings to allow invalid certificates'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-2667438011790381622</id><published>2009-01-24T11:42:00.003+13:00</published><updated>2009-01-24T11:46:11.353+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='web browsers'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><title type='text'>Handy Chrome hint</title><content type='html'>From an &lt;a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10553227" target="_blank"&gt;interview in the NZ Herald with a Google Chrome developer&lt;/a&gt;.&lt;br /&gt;&lt;blockquote cite="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10553227"&gt;&lt;br /&gt;Personally I find Incognito is particularly useful for multiple Gmail profiles. I have a business and personal Gmail account, and can be signed into both simultaneously by logging into one in an Incognito window because the cookie stores are independent.&lt;br /&gt; (Ben Goodger)&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Given that I typically have multiple browsers open at any given time for this reason (for more than just gmail), with the corresponding hit on system resources and performance, &lt;a href="http://www.google.com/chrome" target="_blank" title="Chrome homepage"&gt;Chrome&lt;/a&gt; may have just become a lot more useful. &lt;br /&gt;&lt;br /&gt;Limited slightly by the fact that the cookies for automatic login ("remember me") to web apps in your incognito window won't be saved between sessions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-2667438011790381622?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/2667438011790381622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=2667438011790381622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2667438011790381622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/2667438011790381622'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/01/handy-chrome-hint.html' title='Handy Chrome hint'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-444268615364685842</id><published>2009-01-12T17:16:00.003+13:00</published><updated>2009-01-12T17:58:29.267+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='progressive enhancement'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>GET should always be safe, and developments</title><content type='html'>I was watching the &lt;a href="http://www.jaijaz.co.nz/phpug-dec08" target="_blank"&gt;video&lt;/a&gt; of a presentation about REST at the December &lt;a href="http://groups.google.com/group/nzphpug" title="NZ PHP User Group mailing list" target="_blank" &gt;nzphpug&lt;/a&gt; meetup, where the point was made repeatedly that the GET aspect of the http protocol should always be 'safe' - ie not alter the resource or record it is looking at. &lt;br /&gt;&lt;br /&gt;Now as a PHP programmer I often break that rule, as a GET string is a quick and easy way of passing instructions and variables to a processing script.&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Example GET string - everything after the '?'&lt;/span&gt;&lt;br /&gt;&lt;code&gt;   http://www.mysite.com/do-something.php?id=123&amp;amp;action=delete &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The dangers of this approach are pretty evident&lt;ul&gt;&lt;li&gt;the ease with which someone can try and submit an invalid variable to break the processing script, &lt;/li&gt;&lt;li&gt;what happens if a spider crawls a page with a whole list of these ... say bye bye to all the records if it's a delete link&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;It's the second I want to take a closer look at, and put some time into developing a safe(er) alternative than doing ones darndest to make sure a spider never gets near. &lt;br /&gt;&lt;br /&gt;The immediate solution is to take the user to a confirmation page which will then submit the action using POST rather than GET, especially for irreversible actions. This is an extra page load and I usually prefer to implement confirmation functionality with an onclick event on the link itself.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Example link with confirmation javascript&lt;/span&gt;&lt;br /&gt;&lt;code&gt; &amp;lt;a href=&amp;quot;http://www.mysite.com/do-something.php?id=123&amp;amp;action=delete&amp;quot; onclick=&amp;quot;if(confirm('Are you sure you want to do that?')){return true;}else{return falsel}&amp;quot; &amp;gt; Delete &amp;lt;/a&amp;gt; &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Of course this confirmation will still not be triggered by spiders or people without JavaScript, another reason to look for an alternative.&lt;br /&gt;&lt;br /&gt;The REST style solution involves rewriting requests at the server. I actually want a script-based solution.&lt;br /&gt;&lt;br /&gt;My proposed solution includes:&lt;ul&gt;&lt;li&gt;keeping the link for those without javascript,&lt;/li&gt;&lt;li&gt;using javascript to enhance the link with confirmation functionality and to fill/submit a POSTing form with the required variables&lt;/li&gt;&lt;li&gt;have the processing script react based on what is received - if GET then display a confirmation form which will POST back to itself, if POST then go ahead with the script&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In my next post on the subject I'll look at creating and progressivly enhancing the link.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-444268615364685842?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/444268615364685842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=444268615364685842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/444268615364685842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/444268615364685842'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2009/01/get-should-always-be-safe-and.html' title='GET should always be safe, and developments'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5844989509438288027</id><published>2008-12-02T21:01:00.003+13:00</published><updated>2008-12-02T21:13:59.598+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='web services'/><title type='text'>Todoist.com - simple yet powerful</title><content type='html'>I live by to do lists, and have been evaluating several online services for managing my daily projects. Of the many out there &lt;a href="http://www.todoist.com/" target="_blank"&gt;todoist&lt;/a&gt; is currently my favourite. Winning features for me are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;easily creating items and sub-tasks&lt;/li&gt;&lt;li&gt;using entries without checkboxes as project containers or notes on an item&lt;/li&gt;&lt;li&gt;excellent due-date management&lt;/li&gt;&lt;li&gt;fully featured google widget for my iGoogle page&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Their intuitive implementation of labels/contexts/tags will prove advantageous in the future as well. &lt;br /&gt;&lt;br /&gt;It's well worth reading through the documentation/watching a couple of screencasts to pick up a few tricks - like quick indenting with Ctrl+arrows, or creating a new line within an item with Ctrl+n.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5844989509438288027?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5844989509438288027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5844989509438288027' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5844989509438288027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5844989509438288027'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/12/todoistcom-simple-yet-powerful.html' title='Todoist.com - simple yet powerful'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5550201287396460728</id><published>2008-11-30T18:17:00.001+13:00</published><updated>2008-12-02T21:15:37.597+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>css nesting inflation</title><content type='html'>Creating web pages can lead to something of a conflict between the desire for absolute control of the elements of design, and the need for websites to&lt;br /&gt;&lt;ul&gt;&lt;li&gt;display cleanly in a variety of browsers with different default settings&lt;/li&gt;&lt;li&gt;be modified by the user settings which disable images/scripting or change fonts.&lt;/li&gt;&lt;/ul&gt;Font sizing in particular typifies this conflict. Sure you can absolutely size your font, but some browsers (IE, I'm looking at you) then won't correctly scale up the font if the user zooms in, making life difficult for vision impaired users.&lt;br /&gt;&lt;br /&gt;The article &lt;a href="http://www.alistapart.com/articles/howtosizetextincss"&gt;How to Size Text in CSS&lt;/a&gt; at A List Apart addresses this nicely. Unfortunately I last read it quite some time ago and when I went to apply it recently misremembered vital pieces - notably I set a base font size in &lt;span style="font-family:courier new;"&gt;body&lt;/span&gt; and styled all the elements in ems from there. Relatively long winded but fine as long as your code is semantically clean (even seemed to scale properly in IE,  which requires further examination).&lt;br /&gt;&lt;br /&gt;Problems arise when nested tables or lists and similar elements (&amp;lt;table&amp;gt;&amp;lt;h*&amp;gt;, &amp;lt;table&amp;gt;&amp;lt;p&amp;gt;, ...) are introduced, as elements styled in em inherit the base size rom their parent, not the body. So a 1.2em paragraph font in a 1.2em table displays at  1.44em (or starting from a base of 10px, a paragraph should display at 12px as will unformatted text in a table, but a paragraph in a table will become 14px).&lt;br /&gt;&lt;br /&gt;You can counter this with additional style rules to counter the likely combinations of nested elements, but that gets time consuming and you'll always miss one...&lt;br /&gt;&lt;br /&gt;Next time I'll reread the article first. It's also good to be reminded that most common browsers absent other instruction will display text at 16px, rather than the 12px that seems to be the most common size actually used, at least in the websites I regularly work with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5550201287396460728?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5550201287396460728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5550201287396460728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5550201287396460728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5550201287396460728'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/11/css-nesting-inflation.html' title='css nesting inflation'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6798862915205508411</id><published>2008-11-24T12:49:00.005+13:00</published><updated>2008-11-25T18:07:17.629+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='progressive enhancement'/><title type='text'>A bit of progressive javascript</title><content type='html'>webknight.co.nz has just been (mostly) rebuilt and while still working on what exactly to do with the front page I've put up a slideshow of some cartoons that were hanging around on my hard drive. They came via email years ago, so I'm not sure who to attribute them to.&lt;br /&gt;&lt;br /&gt;The slideshow uses a script from from &lt;a href="http://snippets.dzone.com/posts/show/1068" target="_blank"&gt;DZone snippets&lt;/a&gt;, chosen because I was already using the scriptaculous libraries elsewhere on the site, and extended slightly for progressive enhancement.&lt;br /&gt;&lt;br /&gt;The original:&lt;br /&gt;&lt;code&gt;&lt;blockquote cite="http://snippets.dzone.com/posts/show/1068"&gt;&lt;br /&gt;&amp;lt;!-- Include scriptaculous libraries in head as usual --&amp;gt;&lt;br /&gt;&amp;lt;div id="slide_wrapper"&amp;gt;&lt;br /&gt;&amp;lt;div id="slideshow1" class="slide"&amp;gt;&amp;lt;div&amp;gt;frame 1&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="slideshow2" class="slide" style="display: none"&amp;gt;&amp;lt;div&amp;gt;frame 2&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="slideshow3" class="slide" style="display: none"&amp;gt;&amp;lt;div&amp;gt;frame 3&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="slideshow4" class="slide" style="display: none"&amp;gt;&amp;lt;div&amp;gt;frame 4&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function start_slideshow(start_frame, end_frame, delay) {&lt;br /&gt;    setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay);&lt;br /&gt;}&lt;br /&gt;                              &lt;br /&gt;function switch_slides(frame, start_frame, end_frame, delay) {&lt;br /&gt;    return (function() {&lt;br /&gt;        Effect.Fade('slideshow' + frame);&lt;br /&gt;        if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; }&lt;br /&gt;        setTimeout("Effect.Appear('slideshow" + frame + "');", 850);&lt;br /&gt;        setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850);&lt;br /&gt;    })&lt;br /&gt;}&lt;br /&gt;start_slideshow(1, 4, 2000);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/code&gt;&lt;br /&gt;All that was required was to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; take out the "display:none" styles so that initially all the images would appear on the page. &lt;/li&gt;&lt;li&gt;add a little bit more javascript to hide them again before starting the slideshow.&lt;/li&gt;&lt;/ul&gt;&lt;code&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;var toHide = new Array('slideshow2','slideshow3','slideshow4','slideshow5');&lt;br /&gt;for(i=0;i&amp;lt;toHide.length;i++)&lt;br /&gt;{&lt;br /&gt;document.getElementById(toHide[i]).style.display = 'none';&lt;br /&gt;document.getElementById(toHide[i]).style.position = 'absolute';&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6798862915205508411?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6798862915205508411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6798862915205508411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6798862915205508411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6798862915205508411'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/11/bit-of-progressive-javascript.html' title='A bit of progressive javascript'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-787636252078755327</id><published>2008-11-11T10:32:00.004+13:00</published><updated>2008-11-11T10:56:23.375+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Ordering your cross-references</title><content type='html'>If you have&lt;br /&gt;table_1 | item_id, etc etc&lt;br /&gt;table_2 | type_id, display_text, etc etc&lt;br /&gt;and a one-to-many cross-reference table&lt;br /&gt;table_x | item_id, type_id&lt;br /&gt;&lt;br /&gt;Something like&lt;br /&gt;&lt;code&gt;&lt;blockquote&gt;&lt;br /&gt;select t2.* from table_x as tx left join table_2 as t2 on t2.type_id = tx.type_id where  tx.item_id = 'item_id'&lt;br /&gt;&lt;/blockquote&gt;&lt;/code&gt;&lt;br /&gt;will output the records in the order they were entered in table_x, which may not be the same for each item_id. If you want to produce say a consistently ordered set of options from table_2 for a select menu relating to your item from table_1 don't forget your 'order by' clause, even if you need an additional column to perform ranking in table_2.&lt;br /&gt;&lt;br /&gt;From a user interface perspective the importance of consistently ordering your lists should be immediately obvious.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-787636252078755327?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/787636252078755327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=787636252078755327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/787636252078755327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/787636252078755327'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/11/ordering-your-cross-references.html' title='Ordering your cross-references'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7050141824654892584</id><published>2008-10-31T14:44:00.002+13:00</published><updated>2008-10-31T14:55:04.002+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Getting the hang of javascript: void(0)</title><content type='html'>I know you can put javascript in the href attribute or even directly into the address bar to manipluate page elements, but I've never managed to get it working consistently, always falling back to a "#" and and onclick event.&lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href="http://www.tizag.com/javascriptT/javascriptvoid.php" target="_blank"&gt;tizag.com's tutorial&lt;/a&gt; I finally understand the need to return a null value, and using void(0) to do so. I'm still having issues, but there are fewer of them.&lt;br /&gt;&lt;br /&gt;And I'm wondering which is better for accessibility (in javascript enabled browsers) - onclick or href?. Correctly one should probably put the javascript in the onclick, returning false so the link is not followed, and if feasible and appropriate a link which will reload the page with the effect reproduced in the href for those with javascript disabled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7050141824654892584?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7050141824654892584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7050141824654892584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7050141824654892584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7050141824654892584'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/10/getting-hang-of-javascript-void0.html' title='Getting the hang of javascript: void(0)'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7210084224020931869</id><published>2008-10-30T21:35:00.004+13:00</published><updated>2008-10-31T15:27:41.478+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>ctype_digit does not automatically parse as string</title><content type='html'>I use ctype_digit to check if an id number passed from a session, cookie or form is indeed an id number which could be generated by a sql auto-increment.&lt;br /&gt;&lt;br /&gt;(is_numeric() allows all sorts, is_int() allows signs)&lt;br /&gt;&lt;br /&gt;PHP is usually pretty good at inferring whether a variable should be treated as a string or as an integer from context. But I recently encountered a wrinkle.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;blockquote&gt;[valid mysql insert query]&lt;br /&gt;&lt;br /&gt;$id = mysql_insert_id(); //get the id of the record we just inserted&lt;br /&gt;if(ctype_digit($id))&lt;br /&gt;{ &lt;br /&gt;  echo "TRUE";&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; echo "FALSE";&lt;br /&gt;}&lt;/blockquote&gt;&lt;/code&gt;&lt;br /&gt;Will output:&lt;br /&gt;&lt;code&gt;&lt;blockquote&gt;FALSE&lt;/blockquote&gt;&lt;/code&gt;&lt;br /&gt;This must be because mysql_insert_id returns a number and a non-string type (I haven't checked which) because casting $id as a string solves the problem. I usually do this in the function, to be sure.&lt;br /&gt;&lt;code&gt;&lt;blockquote&gt;function is_numeric_id($id)&lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; if(cdata_digit( (string)$id )&lt;br /&gt; {&lt;br /&gt;  return $id;  &lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;  return false;&lt;br /&gt; }&lt;br /&gt; // note that '0', also an invalid id, will pass this test but can be treated as false when evaluating the result of the function &lt;br /&gt;}&lt;/blockquote&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7210084224020931869?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7210084224020931869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7210084224020931869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7210084224020931869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7210084224020931869'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/10/ctypedigit-does-not-automatically-parse.html' title='ctype_digit does not automatically parse as string'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-3155291588894204667</id><published>2008-10-27T16:33:00.004+13:00</published><updated>2008-10-27T17:02:48.737+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'></title><content type='html'>In a post on progressive enhancement with CSS at &lt;a href="http://alistapart.com/articles/progressiveenhancementwithcss" target="_blank"&gt;A List Apart&lt;/a&gt; Aaron Gustafson mentions using generated content to add the colon often found between a form field and it's label (in both semantic and markup contexts).&lt;br /&gt;&lt;blockquote cite="http://alistapart.com/articles/progressiveenhancementwithcss"&gt;When coding this, you may be tempted to put those colons (:) inside the label element. Why? Do they add anything to the labels? No. While they do serve a purpose, to provide additional visual cues to a user, they are superfluous to the label and should be left out.&lt;br /&gt;...&lt;br /&gt;Generated content is a perfectly appropriate way to add them back into the document:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;label:after {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;content: ":";&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Approaching the form in this way gives us the flexibility to remove those decorations from our entire site by simply editing the CSS, rather than having to touch each and every form.&lt;br /&gt;&lt;/blockquote&gt; &lt;br /&gt;I realised a few days later while thinking about this article and the implications of generated content for content/presentation separation, that a common pitfall in working with text is &lt;em&gt;assuming that punctuation is content&lt;/em&gt; - where in many cases (like this, and the use of quote marks would be another) it is actually presentation. &lt;br /&gt;&lt;br /&gt;Certainly it's an assumption I'd never recognised let alone questioned before.&lt;br /&gt;&lt;br /&gt;~~~&lt;br /&gt;&lt;br /&gt;Aside - I tend to wrap my labels around the fields if at all possible to implicitly link them as well as explicitly using the "for" attribute, but the method could equally well be applied to a &amp;lt;span&amp;gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-3155291588894204667?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/3155291588894204667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=3155291588894204667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3155291588894204667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3155291588894204667'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/10/in-post-on-progressive-enhancement-with.html' title=''/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-3235848188793876708</id><published>2008-09-26T18:11:00.005+12:00</published><updated>2008-09-26T18:26:52.023+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript status updater</title><content type='html'>This is just a little function for updating the innerHTML of a &amp;lt;div&amp;gt; to provide feedback on a script. I find it more convenient than relying on (and constantly clicking on) alerts.&lt;br /&gt;&lt;br /&gt;By the by, don't hit 'Enter' to get rid of an alert message while a form field with an onkeyup (or similar) event has the focus. It'll register and fire the event.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;function updateStatusBox(elemID,newHTML,append)&lt;br /&gt;{&lt;br /&gt;// append is true/false&lt;br /&gt;d = document.getElementById(elemID);&lt;br /&gt;if(append){&lt;br /&gt;d.innerHTML = d.innerHTML + newHTML + '&amp;lt;br /&amp;gt;';&lt;br /&gt;} else {&lt;br /&gt;d.innerHTML = newHTML;&lt;br /&gt;}&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;An example use is updateStatusBox('output',stringToCheck,true);&lt;br /&gt;&lt;br /&gt;I've recently been using it to look at output and status codes returned from external AJAX calls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-3235848188793876708?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/3235848188793876708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=3235848188793876708' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3235848188793876708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/3235848188793876708'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/09/javascript-status-updater.html' title='Javascript status updater'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-704237290590898951</id><published>2008-09-13T14:59:00.007+12:00</published><updated>2008-10-27T17:08:00.958+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Form layout with CSS</title><content type='html'>I also call this "faux-tables" - basically it's a way of replicating a column layout using horizontal elements without resorting to a table. I developed it for dealing with simple forms which needed text right-aligned and inputs left-aligned to a central position, while still containing the inputs within their respective labels;&lt;br /&gt;&lt;br /&gt;CSS:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;label{ display: block; clear: left; max-width:98%; /* for IE display glitch */ }&lt;br /&gt;span.label_text { display:block; float:left; clear:left; width: 25%; text-align:right }&lt;br /&gt;span.input { display: block; float:left; }&lt;br /&gt;.clear { display:block; height: 1px; clear: both; }&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;HTML:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;form&amp;gt;&lt;br /&gt;&amp;lt;label for="text_field"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="label_text"&amp;gt;Text Field:&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="input"&amp;gt;&amp;lt;input name="text_field" id="text_field" type="text"&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;label for="text_area"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="label_text"&amp;gt;Text Area:&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="input"&amp;gt;&amp;lt;textarea name="text_area" id="text_area" cols="20" rows="4"&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;label for="checkL"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="label_text"&amp;gt;Check text left:&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="input"&amp;gt;&amp;lt;input name="checkL" id="checkL" type="checkbox" value="L"&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;label for="checkR"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="label_text"&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="input"&amp;gt;&amp;lt;input name="checkR" id="checkR" type="checkbox" value="R"&amp;gt; Check text right&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;label for="radioL"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="label_text"&amp;gt;Radio text left:&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="input"&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;label for="radioR"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="label_text"&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;span class="input"&amp;gt;&amp;lt;input name="radio" id="radioR" type="radio" value="R"&amp;gt; Radio text right&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-704237290590898951?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/704237290590898951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=704237290590898951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/704237290590898951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/704237290590898951'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/09/form-layout-with-css.html' title='Form layout with CSS'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-8969446814853665855</id><published>2008-08-26T19:33:00.002+12:00</published><updated>2008-08-26T19:42:01.390+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='correction'/><category scheme='http://www.blogger.com/atom/ns#' term='menus'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='lists'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>A correction to the previous post</title><content type='html'>And only a month to get around to doing so.&lt;br /&gt;&lt;br /&gt;In between originally developing a solution for this problem and redeveloping it for posting I upgraded to Firefox 3. I should have listened to the little voice which said "that's not how you did it last time"...&lt;br /&gt;&lt;br /&gt;The previous code doesn't work in FF2. This code works in both.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;wrapper&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;ul&amp;gt;&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;2nd Item&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item three&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;/ul&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The css:&lt;blockquote&gt;&lt;code&gt;body {&lt;br /&gt;   text-align:center; /*start centering for IE */&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#wrapper {&lt;br /&gt;   display: table;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ul {&lt;br /&gt;   display:table-row;&lt;br /&gt;   position:relative; /*catch floated &amp;lt;li&amp;gt;s */&lt;br /&gt;   margin:0px auto;&lt;br /&gt;   padding:0px;&lt;br /&gt;   border: 1px solid #ff00ff; /*positioning outline */&lt;br /&gt;   list-style-type: none;    /* get rid of the bullet */&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;li {&lt;br /&gt;   display: table-cell;&lt;br /&gt;   width:150px; /* fixed width cell */&lt;br /&gt;   padding:2px;&lt;br /&gt;   margin: 2px;&lt;br /&gt;   border: 1px solid #0000FF;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;* html li { display: inline; } /* IE 6 */&lt;br /&gt;*+html li { display: inline; } /* IE 7 */&lt;br /&gt;&lt;br /&gt;/* make links take up entire cell - style for button effects */&lt;br /&gt;li a:link, li a:visited {&lt;br /&gt;   display:inline-block;&lt;br /&gt;   width: 150px;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-8969446814853665855?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/8969446814853665855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=8969446814853665855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8969446814853665855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/8969446814853665855'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/08/correction-to-previous-post.html' title='A correction to the previous post'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-7256543658852960496</id><published>2008-06-28T09:57:00.005+12:00</published><updated>2008-06-28T12:06:45.035+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='menus'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='lists'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Centered horizontal list navigation - in IE!</title><content type='html'>I like to use lists for my navigation - it's tidy and for vertical navigation menus requires a minimum of styling.&lt;br /&gt;&lt;br /&gt;For horizontal navigation menus it's a bit trickier.&lt;ul&gt;&lt;li&gt;the simplest method is to set &lt;code&gt;display: inline&lt;/code&gt; on the &amp;lt;li&amp;gt;s - this gives a horizontal flow where the "cells" size themselves to the menu entry.&lt;/li&gt;&lt;li&gt;if you need fixed-width cells you can try &lt;code&gt;display:inline-block&lt;/code&gt; (IE doesn't like this) or &lt;code&gt;display:block; float:left&lt;/code&gt; (better) in conjunction with your fixed width.&lt;/li&gt;&lt;li&gt;Oh, the menu needs to be centered and expand on both sides with each additional item? Ummm...&lt;/li&gt;&lt;/ul&gt;The bugbear as usual is Internet Explorer. IE (7 or earlier, who knows about 8?) will determinedly expand all containers as wide as possible and then shunt your floating &amp;lt;li&amp;gt;s to the left (or right, if that's where you were going). Other browsers will shrink them to fit the content and center the result to obey a &lt;code&gt;margin: 0px auto&lt;/code&gt; style rule.&lt;br /&gt;After several tries I have come up with a solution that works for me.&lt;br /&gt;The html:&lt;blockquote&gt;&lt;code&gt;&amp;lt;body&amp;gt;&lt;br /&gt;   &amp;lt;ul&amp;gt;&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;2nd Item&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item three&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;/ul&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The css:&lt;blockquote&gt;&lt;code&gt;body {&lt;br /&gt;   text-align:center; /*start centering for IE */&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ul {&lt;br /&gt;   position:relative; /*catch floated &amp;lt;li&amp;gt;s */&lt;br /&gt;   margin:0px auto;&lt;br /&gt;   padding:0px;&lt;br /&gt;   border: 1px solid #ff00ff; /*positioning outline */&lt;br /&gt;   list-style-type: none;    /* get rid of the bullet */&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;li {&lt;br /&gt;   display: inline-block;&lt;br /&gt;   width:150px; /* fixed width cell */&lt;br /&gt;   padding:2px;&lt;br /&gt;   margin: 2px;&lt;br /&gt;   border: 1px solid #0000FF;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;* html li { display: inline; } /* IE 6 */&lt;br /&gt;*+html li { display: inline; } /* IE 7 */&lt;br /&gt;&lt;br /&gt;/* make links take up entire cell - style for button effects */&lt;br /&gt;li a:link, li a:visited {&lt;br /&gt;   display:inline-block;&lt;br /&gt;   width: 150px;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Sure IE doesn't apply width to that inline &amp;lt;li&amp;gt; - but it accepts the width on the following &amp;lt;a&amp;gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-7256543658852960496?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/7256543658852960496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=7256543658852960496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7256543658852960496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/7256543658852960496'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/06/centered-horizontal-list-navigation-in.html' title='Centered horizontal list navigation - in IE!'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1300769375520303108</id><published>2008-06-24T12:49:00.003+12:00</published><updated>2008-06-24T13:25:30.729+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>$_SESSION didn't save my array</title><content type='html'>Problem: I'm using an array in $_SESSION to store the order of items in a randomly generated list, but the array is not being retained between page refreshes.&lt;br /&gt;&lt;br /&gt;Solution: an obscure bit of php documentation notes that the keys in  $_SESSION must follow the naming rules of regular variables, ie. start with a letter or underscore. I was using a numeric identifier.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/session.examples.php"&gt;Manual page&lt;/a&gt; (Session examples)&lt;/li&gt;&lt;li&gt;A couple of related &lt;a href="http://bugs.php.net/bug.php?id=37837"&gt;bug&lt;/a&gt; &lt;a href="http://bugs.php.net/bug.php?id=44545"&gt;reports&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;What took me so long to recognise and track the issue down for myself is that the array remained set and functioning for the remainder of the page rather than failing outright. It just wasn't there next time, lost in the ether.&lt;br /&gt;&lt;br /&gt;Incidentally the reason for storing the list is so that if a visitor returns to the page (in the same session)  to look for something it will still display as/where they remembered it, and so that if the list spans multiple pages items don't get missed/repeated. This is a usability issue on several levels, but that's not the focus of this post :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1300769375520303108?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1300769375520303108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1300769375520303108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1300769375520303108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1300769375520303108'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/06/session-didnt-save-my-array.html' title='$_SESSION didn&apos;t save my array'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-4718788143809573937</id><published>2008-05-20T21:53:00.002+12:00</published><updated>2008-05-20T22:18:36.614+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seo'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_rewrite'/><category scheme='http://www.blogger.com/atom/ns#' term='no-www'/><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><title type='text'>Redirection to www. by .htaccess - generalised solution</title><content type='html'>Most people who know how the rudiments  of htaccess are familiar with the specific solution to this problem for one domain. Today I was looking for a domain-independent solution so as to be able to reuse one htaccess file over several  sites without customising it for each domain.&lt;br /&gt;&lt;br /&gt;There are several reasons why you might want to redirect all visitors to http://yourdomain to http://&lt;span style="font-weight: bold;"&gt;www.&lt;/span&gt;yourdomain or vice versa. The two biggies are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;avoid being penalised by the search engines for duplicate content&lt;/li&gt;&lt;li&gt;conversion by &lt;a href="http://no-www.org/"&gt;no-www.org&lt;/a&gt; *&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Google failed to supply anything which wasn't a site-specific solution, so I stretched my limited knowledge of htaccess and eventually developed a rule that worked.&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;&lt;span style="font-size:78%;"&gt;# mod_rewrite in use&lt;br /&gt;Options +FollowSymlinks&lt;br /&gt;RewriteEngine On&lt;br /&gt;&lt;br /&gt;RewriteCond %{HTTP_HOST} !^www\..*$ [NC]&lt;br /&gt;RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]&lt;/span&gt;&lt;/blockquote&gt;Translation - if http_host &lt;span style="font-style: italic;"&gt;doesn't&lt;/span&gt; begin with www., put it there. Reversing this to remove www. might not be such a simple matter, but fortunately that is a problem for another day.&lt;br /&gt;&lt;br /&gt;*I fall in favour of using www., as elucidated by &lt;a href="http://www.ragepank.com/articles/www-or-non-www/"&gt;Harvey Kane at ragepank&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-4718788143809573937?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/4718788143809573937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=4718788143809573937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4718788143809573937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/4718788143809573937'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/05/redirection-to-www-by-htaccess.html' title='Redirection to www. by .htaccess - generalised solution'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-6744932081455233487</id><published>2008-05-19T18:49:00.005+12:00</published><updated>2008-05-19T19:12:20.655+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='GAotD'/><category scheme='http://www.blogger.com/atom/ns#' term='websites'/><title type='text'>Giveaway of the Day</title><content type='html'>&lt;acronym title="GiveAway of the Day"&gt;GAotD&lt;/acronym&gt; (for short) is a site offering the next step in the shareware/trialware cycle. Each day you may download and install a fully functional version of a program for evaluation/non-commercial use. These installations don't expire but must be activated within the 24 hour period, using GAoTD's installer.&lt;br /&gt;&lt;br /&gt;Most of the applications are easily affordable should you wish to purchase them for commercial use or after that eventual system reinstall/new computer, usually  in the range US$20-$50.  There is an active testing and commenting community so it is  possible to form a good opinion on how useful any given offering will be before  trying it yourself.&lt;br /&gt;&lt;br /&gt;I will periodically review (pimp) programs I find particlarly useful, and I've also included their widget in my sidebar (pending a more detailed page I'm working on).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.giveawayoftheday.com/"&gt;http://www.giveawayoftheday.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-6744932081455233487?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/6744932081455233487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=6744932081455233487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6744932081455233487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/6744932081455233487'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/05/giveaway-of-day.html' title='Giveaway of the Day'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-5129599235775023170</id><published>2008-04-30T15:26:00.003+12:00</published><updated>2008-04-30T15:36:07.113+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Don't rely on php to recognise number_format()ed strings as thier original number</title><content type='html'>Seems like a good idea, store a frequently output number in it's formatted form and rely on &lt;a href="http://www.php.net/string" traget="_blank"&gt;php's string conversion&lt;/a&gt; to recognise it if you need to use it for simple calculations - adding it to another number for example.&lt;br /&gt;&lt;br /&gt;This works fine, until you reach the 1k mark and discover that php recognises the string 1,000 as ... you realised it, and I should have before having to do a bunch of recoding ... 1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-5129599235775023170?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/5129599235775023170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=5129599235775023170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5129599235775023170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/5129599235775023170'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/04/dont-rely-on-php-to-recognise.html' title='Don&apos;t rely on php to recognise number_format()ed strings as thier original number'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-1371848630011270967</id><published>2008-04-25T09:51:00.006+12:00</published><updated>2008-05-19T19:13:36.068+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>php ignores leading zero when comparing strings which evaluate to numbers</title><content type='html'>It's probably just a trap for newcomers, but because php evaluates strings as numbers in a numeric context if you have two strings which both evaluate to the same number you can get issues like this:&lt;br /&gt;&lt;blockquote  style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;$code1 = "001";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$code2 = "0001";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if($code1 == $code2){ return true; }else{ return false; } // returns true&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if("$code1" == "$code2"){ return true; }else{ return false; } // returns true&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if(strval($code1) == strval($code2)){ return true; }else{ return false; } // returns true&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if($code1 != $code2){ return false; }else{ return true; }// returns true&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;This can cause issues if you are, say, wanting to change  database entries or filenames based on whether an alphanumeric id code has been changed.&lt;br /&gt;&lt;br /&gt;The simplest solution is to use a more absolute comparison operator, a more complicated one (if you're still paranoid) is to also check the string lengths.&lt;br /&gt;&lt;blockquote  style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;if($code1 === $code2){ return true; }else{ return false; } // returns false&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if($code1 !== $code2){ return false; }else{ return true; } // returns false&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if($code1 != $code2 || ($code1 == $code2  &amp;amp;&amp;amp; strlen($code1) != strlen($code2) ) ){return false;}else{return true;} //returns false&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Possibly related, buried in the comments on the &lt;a href="http://nz2.php.net/string"&gt;php.net string page&lt;/a&gt; is an account of a similar problem detecting very small differences between very large integers with the == and != operators.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-1371848630011270967?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/1371848630011270967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=1371848630011270967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1371848630011270967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/1371848630011270967'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/04/php-ignores-leading-zero-when-comparing.html' title='php ignores leading zero when comparing strings which evaluate to numbers'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-196080185729128086</id><published>2008-04-18T21:31:00.003+12:00</published><updated>2008-04-18T21:49:29.537+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='overrides'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='forms'/><title type='text'>Staying put with backspace - disable accidental 'go backs' from your form pages</title><content type='html'>Recently I was asked to find a way of stopping users "going back" a page accidentally by hitting the Backspace key while filling in a form, but not of course preventing it's use in text elements.&lt;br /&gt;&lt;br /&gt;I did a bit of research and fiddling on my own with unsatisfactory results before a google search turned up a working script at &lt;a href="http://mspeight.blogspot.com/2007/05/how-to-disable-backspace-in-ie-and.html"&gt;http://mspeight.blogspot.com/&lt;/a&gt; which throws up a javascript confirmation dialog.&lt;br /&gt;&lt;br /&gt;By working, I mean in Internet Explorer and Firefox. Unfortunately Opera doesn't seem to pick up on it.&lt;br /&gt;&lt;br /&gt;This script also prevents the user accidently submitting the form by hitting "Enter" when the focus is anywhere except on the "Submit" button. This extra actually frustrated our users and is easy enough to strip out by dropping the references to keycode 13.&lt;br /&gt;&lt;br /&gt;Thanks Murray :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-196080185729128086?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/196080185729128086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=196080185729128086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/196080185729128086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/196080185729128086'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2008/04/staying-put-with-backspace-disable.html' title='Staying put with backspace - disable accidental &apos;go backs&apos; from your form pages'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1881619893792778188.post-666820695588010217</id><published>2007-06-16T17:59:00.000+12:00</published><updated>2007-06-16T18:27:29.498+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog admin'/><title type='text'>First Post</title><content type='html'>This blog may develop into something else, but right now it is just for me to maintain notes on interesting stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1881619893792778188-666820695588010217?l=webknight-nz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webknight-nz.blogspot.com/feeds/666820695588010217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1881619893792778188&amp;postID=666820695588010217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/666820695588010217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1881619893792778188/posts/default/666820695588010217'/><link rel='alternate' type='text/html' href='http://webknight-nz.blogspot.com/2007/06/first-post.html' title='First Post'/><author><name>Robert</name><uri>http://www.blogger.com/profile/15841707398838954464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_DTOyS3nH0Ho/STy3os6d8SI/AAAAAAAAAAM/Z5oxSWguln0/S220/tie128x128.jpg'/></author><thr:total>0</thr:total></entry></feed>
