<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.andyhume.net &#187; 2005</title>
	<atom:link href="http://blog.andyhume.net/2005/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.andyhume.net</link>
	<description>Thoughts and commentary on web development</description>
	<lastBuildDate>Thu, 13 May 2010 13:37:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Improvements to form script</title>
		<link>http://blog.andyhume.net/improvements-to-form-enhancement-script</link>
		<comments>http://blog.andyhume.net/improvements-to-form-enhancement-script#comments</comments>
		<pubDate>Sun, 13 Nov 2005 15:02:47 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/11/improvements-to-form-enhancement-script/</guid>
		<description><![CDATA[I have made various improvements to the way the form enhancement script works. On the advice of Mark Wubbenthe event handlers are now set with proper event model methods and not with the setAttribute property. I kind of see your point, Mark. More importantly, the script is now much more generic and should work on [...]]]></description>
			<content:encoded><![CDATA[<p>I have made various improvements to the way the <a href="http://thedredge.org/2005/11/highlighting-form-labels/">form enhancement script</a> works. On the advice of <a href="http://novemberborn.net">Mark Wubben</a>the event handlers are now set with proper event model methods and not with the <code>setAttribute</code> property. I kind of see your point, Mark.</p>
<p>More importantly, the script is now much more generic and should work on just about any page you plug it in to. It now works by getting the <code>id</code> of the <code>input</code> element that is currently in focus and searching for a <code>label</code> element with a matching <code>for</code> attribute. This means we are not relying on any other feature of the markup to make the script work.</p>
<p><code><br />
id = this.getAttribute('id');<br />
label = document.getElementsByTagName('label');<br />
for (k = 0 ; k &lt; label.length ; k++) {<br />
if (label[k].getAttribute(&#39;for&#39;) == id) {<br />
label[k].style.color = &#39;#a00&#39;;<br />
}<br />
</code></p>
<p>One issue I&#8217;m having is being able to concatenate two HTML Object collections. I have an array of <code>input</code>s and an array of <code>textarea</code>s, so my question is, why can I not concatenate them as follows.</p>
<p><code><br />
input = document.getElementsByTagName('input');<br />
textarea = document.getElementsByTagName('textarea');<br />
both = input.concat(text);<br />
</code></p>
<p>At the moment I am using the DOM Level 0 method of getting form elements; which works, but I&#8217;d rather do it the previous way, and build my own arrays. Any ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/improvements-to-form-enhancement-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Highlighting form labels</title>
		<link>http://blog.andyhume.net/highlighting-form-labels</link>
		<comments>http://blog.andyhume.net/highlighting-form-labels#comments</comments>
		<pubDate>Thu, 10 Nov 2005 23:05:51 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/11/highlighting-form-labels/</guid>
		<description><![CDATA[Here&#8217;s a nice little UI enhancement for forms that I knocked up today. I don&#8217;t know if you have seen anything like it before? If so, let me know where, and I can see about improving my scripts. Talking of improving the script, I&#8217;ve realised there is a far better way of achieving this than [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice little UI enhancement for forms that I knocked up today. I don&#8217;t know if you have seen anything like it before? If so, let me know where, and I can see about improving my scripts.</p>
<p>Talking of improving the script, I&#8217;ve realised there is a far better way of achieving this than how I have done it, which I will explain in a minute. First of all, go down to the comment form at the end of this post and fill in a few fields. Notice the labels become highlighted as each form field gets focus. Here&#8217;s how it&#8217;s done.</p>
<p>First of all, get every <code>input</code> element in the page with a <code>type</code> attribute of <code>text</code>. Loop through these and add the <code>onsubmit</code> and <code>onblur</code> event handlers required to trigger the functions which do the real business. This is done with the <code>prepareLabels</code> function shown below, although now I think about it, <code>prepareInputs</code> might have been more appropriate.</p>
<p><code><br />
function prepareLabels () {<br />
if (!document.getElementsByTagName('input')) exit;<br />
input = document.getElementsByTagName('input');<br />
for (i = 0 ; i &lt; input.length ; i++) {<br />
if (input[i].type == &#39;text&#39;) {<br />
input[i].setAttribute(&quot;onfocus&quot;,&quot;on(this)&quot;);<br />
input[i].setAttribute(&quot;onblur&quot;,&quot;off(this)&quot;);<br />
}<br />
}<br />
}<br />
</code></p>
<p>Next up I have two functions. One that changes the <code>style.color</code> property to the highlight color <code>onfocus</code>, and the other that reverts the property <code>onblur</code>. I realise that I could combine these into one function with a simple if statement, and I will do in the next version of this. The two functions are shown below.</p>
<p><code><br />
function on(field) {<br />
temp = field.parentNode;<br />
dl = temp.previousSibling;<br />
label = dl.firstChild;<br />
label.style.color = '#a00';<br />
}<br />
function off(field) {<br />
temp = field.parentNode;<br />
dl = temp.previousSibling;<br />
label = dl.firstChild;<br />
label.style.color = '';<br />
}<br />
</code></p>
<p>In a nutshell, these navigate their way throught the <acronym title="Document Object Model">DOM</acronym> tree of <code>dd</code> and <code>dl</code>, finish up on the <code>label</code> element and apply the new color through the <code>style.color</code> property.</p>
<p>And that&#8217;s pretty much it. <a href="http://simon.incutio.com/archive/2004/05/26/addLoadEvent">Simon Willison&#8217;s <code>addLoadEvent</code></a>finishes the job by attaching the <code>prepareLabels</code> function to the <code>onload</code> event.</p>
<p>But what about the <code>textarea</code> your thinking, right? Well, at the moment I actually have a third function which duplicate&#8217;s the <code>prepareLabels</code> function but gets the <code>textareas</code> instead.<br />
<code><br />
function prepareText () {<br />
if (!document.getElementsByTagName('textarea')) exit;<br />
input = document.getElementsByTagName('textarea');<br />
for (j = 0 ; j &lt; input.length ; j++) {<br />
input[j].setAttribute(&quot;onfocus&quot;,&quot;on(this)&quot;);<br />
input[j].setAttribute(&quot;onblur&quot;,&quot;off(this)&quot;);<br />
}<br />
}<br />
</code></p>
<p>I know this is not a nice way of doing things, and it will be improved.</p>
<p>The next stage I want to think about now is making this much more generic. A better solution would be to use the <code>for</code> attribute  of the <code>label</code> and match it with the <code>id</code> value of the <code>input</code> that is currently in focus. That way, we are not relying on our form being layed out with definition lists as I currently am.</p>
<p>Anyway, that&#8217;s something to think about while I&#8217;m on my way down to <a href="http://www.clearleft.com/services/training/dconstruct.php">d.construct</a>bright and early tomorrow morning.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/highlighting-form-labels/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few design tweaks</title>
		<link>http://blog.andyhume.net/a-few-design-tweaks</link>
		<comments>http://blog.andyhume.net/a-few-design-tweaks#comments</comments>
		<pubDate>Mon, 07 Nov 2005 01:04:16 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/11/a-few-design-tweaks/</guid>
		<description><![CDATA[Regulars will notice the slight change to the layout and feel that I&#8217;ve just made. This site is back to what it always used to be &#8212; a blog. Pure and simple. Actually, the reason this completely unscheduled change has just been made, is probably worth mentioning. In short, while doing a little bit of [...]]]></description>
			<content:encoded><![CDATA[<p>Regulars will notice the slight change to the layout and feel that I&#8217;ve just made. This site is back to what it always used to be &#8212; a blog. Pure and simple.</p>
<p>Actually, the reason this completely unscheduled change has just been made, is probably worth mentioning. In short, while doing a little bit of server tidying, I came across the first mock-up I ever made of this <a href="http://thedredge.org/2005/06/yeah-yeah-i-know-audi/">&#8216;Audi inspired&#8217; design</a>. It looked pretty much like what you&#8217;re looking at now.</p>
<p>I took one look at it and thought, hmm&#8230; that&#8217;s rather nice, why the hell did I spoil that by adding the side bar and all the extras? This is particularly relevant due to the fact that I never even used the side bar. The external links where all &#8220;Lorem ipsum&#8217;, and for some reason the &#8216;latest post&#8217; loop wasn&#8217;t populating. Basically, it was a complete waste of space.</p>
<p>So, it&#8217;s gone &#8211; and I&#8217;m back to a similar concept as in the previous design, dubbed &#8216;Industrial Minimalist&#8217; by <a href="http://joshuaink.com">John Oxton</a>. Anyway, I like minimalist &#8212; if you&#8217;ve got fuck all content it really is the way to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/a-few-design-tweaks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Am I a spammer?</title>
		<link>http://blog.andyhume.net/am-i-a-spammer</link>
		<comments>http://blog.andyhume.net/am-i-a-spammer#comments</comments>
		<pubDate>Sun, 06 Nov 2005 23:59:33 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/11/am-i-a-spammer/</guid>
		<description><![CDATA[Just a quick question. Over at <a href="http://artistlogs.com">Artist Logs</a>I have a form that allows people to email blog posts to friends that they think will find them interesting. Over the last few days I've started to get a lot of "Mail delivery failed" messages from unknown severs to my email account, and it looks very much like my scripts are being used to send unsolicited email from my server.]]></description>
			<content:encoded><![CDATA[<p>Just a quick question. Over at <a href="http://artistlogs.com">Artist Logs</a>I have a form that allows people to email blog posts to friends that they think will find them interesting. Over the last few days I&#8217;ve started to get a lot of &#8220;Mail delivery failed&#8221; messages from unknown severs to my email account, and it looks very much like my scripts are being used to send unsolicited email from my server.</p>
<p>Is this a common problem, and what can I do to get around it? Do I have to resort to checking for human interaction with the form (ie, &#8216;What colour is an orange?&#8217;) or perhaps use some javscript to keep out bots?</p>
<p>Any advice?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/am-i-a-spammer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X 10.4.3: Tiger roars ahead</title>
		<link>http://blog.andyhume.net/mac-os-x-1043-tiger-roars-ahead</link>
		<comments>http://blog.andyhume.net/mac-os-x-1043-tiger-roars-ahead#comments</comments>
		<pubDate>Wed, 02 Nov 2005 21:40:49 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/11/mac-os-x-1043-tiger-roars-ahead/</guid>
		<description><![CDATA[Apple released the 2nd major upgrade to the OS X Tiger operating system on Tuesay, and after reading reports of generally good install experiences and excellent performance gains I took some time out to install it this evening.]]></description>
			<content:encoded><![CDATA[<p>Apple released the 2nd major upgrade to the OS X Tiger operating system on Tuesay, and after reading reports of generally good install experiences and excellent performance gains I took some time out to install it this evening.</p>
<p>After the 93MB download, I can report one more smooth installation and a rather nice performance boost. The first thing I checked out was Safari passing the <a href="http://www.webstandards.org/act/acid2/test.html#top">Acid 2 Test</a>. Not only does Safari pass that web standards mile stone in this latest version, but it definitely feels snappier than it has in the past&#8212;which is no mean feat.</p>
<p>The application I was most worred about was Mail.app. I&#8217;m very picky about the way my mail is recieved and stored, probably because&#8212;after BBEdit&#8212;it&#8217;s the app I spend the most time using on a day-to-day basis. All my plugins, inlcuding <a href="http://www.bronsonbeta.com/mailappetizer/">Mail.appetizer</a>, <a href="http://www.indev.ca/MailTags.html">Mail Tags</a>are still working perfectly.</p>
<p>Everything is Rosy with the world, so if you&#8217;ve been waiting for a few glowing endorsements of this upgrade then here&#8217;s another one you can add to the list.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/mac-os-x-1043-tiger-roars-ahead/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use my blog</title>
		<link>http://blog.andyhume.net/use-my-blog</link>
		<comments>http://blog.andyhume.net/use-my-blog#comments</comments>
		<pubDate>Fri, 28 Oct 2005 08:33:08 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/10/use-my-blog/</guid>
		<description><![CDATA[I'm trying out <a href="http://adaptivepath.com">Adpative Path<a />'s </a><a href="http://measuremap.com">Measure Map</a>, so come in and use my blog.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying out <a href="http://adaptivepath.com">Adpative Path<a />&#8216;s </a><a href="http://measuremap.com">Measure Map</a>, so come in and use my blog.</p>
<p>First impressions of this tool are pretty good. Dead simple to install, mainly because the whole thing is hosted remotely for you. The only set up you have to do is add some Javscript calls to a site wide include (ie, footer), and to your post loop and comments loop. Takes 5 minutes, tops.</p>
<p>Anyway, leave some comments, have a look around my kinda pathetic blog, and basically get me some stats. I don&#8217;t get massive amounts of traffic here by any means, so perhaps I should have put this up on <a href="http://usabletype.com">UsableType</a>to test it out, but it&#8217;s here now so get stuck in you loyal few! If it&#8217;s worth checking out, I&#8217;ll let you know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/use-my-blog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gDisk for Apple Mac</title>
		<link>http://blog.andyhume.net/gdisk-for-apple-mac</link>
		<comments>http://blog.andyhume.net/gdisk-for-apple-mac#comments</comments>
		<pubDate>Wed, 12 Oct 2005 17:50:11 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/10/gdisk-for-apple-mac/</guid>
		<description><![CDATA[A very cool little app I discovered today is <a href="http://gdisk.sourceforge.net/">gDisk</a>. gDisk is a little upload client that allows you to er... upload files to your gMail space.]]></description>
			<content:encoded><![CDATA[<p>A very cool little app I discovered today is <a href="http://gdisk.sourceforge.net/">gDisk</a>. gDisk is a little upload client that allows you to er&#8230; upload files to your gMail space.</p>
<p>I never use gMail as an email client and I doubt I ever will, but now I can take advantage of the 2.5 GB that are sitting there doing nothing.<br />
Heck, if I run out of space I can just move over to another account. That&#8217;s better than a kick in the teeth, or a Ã‚Â£60 .mac account! NB: Yes I know .mac does more than just that.</p>
<p>Anyway, it&#8217;s handy for casual back-ups as well as sharing between machines. <a href="http://gdisk.sourceforge.net/">Check</a>this one out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/gdisk-for-apple-mac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viral marketing gone horribly, horribly wrong</title>
		<link>http://blog.andyhume.net/viral-marketing-gone-horribly-horribly-wrong</link>
		<comments>http://blog.andyhume.net/viral-marketing-gone-horribly-horribly-wrong#comments</comments>
		<pubDate>Fri, 30 Sep 2005 18:29:31 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/09/viral-marketing-gone-horribly-horribly-wrong/</guid>
		<description><![CDATA[I wouldn&#8217;t normally write about something like this, but my asides don&#8217;t work, and this deserves attention. I read, as do probably a number of you, Tom Coates&#8217; blog. This means I have been following the story of him contacting his father for the first time. Some weeks ago he received a letter from his [...]]]></description>
			<content:encoded><![CDATA[<p>I wouldn&#8217;t normally write about something like this, but my asides don&#8217;t work, and this deserves attention.</p>
<p>I read, as do probably a number of you, <a href="http://plasticbag.org">Tom Coates&#8217; blog</a>. This means I have been following the story of him contacting his father for the first time.</p>
<p>Some weeks ago he received a letter from his father. The first contact between them ever. He wrote about this on his blog in the same honest, natural way he always does.</p>
<p>A few people left comments. One person left this comment:</p>
<blockquote><p>&#8220;Hi Tom, Always remember one thing. Life is very, very short and nothing is worth limiting yourself from seeing the ones you love. I hadn&#8217;t seen my father in 15 years until 2 years ago. I was apprehensive but I kept telling myself that no matter how estranged we&#8217;d become there was no river to wide to cross. Drop me a line if I can be of any more help. Cheers, Barry&#8221;</p></blockquote>
<p><a href="http://www.barryscott.blogs.com/">Barry</a>, thouroughly nice chap that he appears to be, is a marketing vehicle for <a href="http://www.cillitbang.co.uk/">Cillit Bang</a>. What the buggery fuck is the world coming too.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/viral-marketing-gone-horribly-horribly-wrong/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A List Apart</title>
		<link>http://blog.andyhume.net/a-list-apart</link>
		<comments>http://blog.andyhume.net/a-list-apart#comments</comments>
		<pubDate>Sat, 17 Sep 2005 18:45:22 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/09/a-list-apart/</guid>
		<description><![CDATA[Why is <a href="http://alistapart.com">A List Apart</a>fixed width?]]></description>
			<content:encoded><![CDATA[<p>Why is <a href="http://alistpart.com">A List Apart</a>fixed width?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/a-list-apart/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony Ericsson D750 Mobile Phone</title>
		<link>http://blog.andyhume.net/sony-ericsson-d750i-mobile-phone</link>
		<comments>http://blog.andyhume.net/sony-ericsson-d750i-mobile-phone#comments</comments>
		<pubDate>Thu, 15 Sep 2005 20:16:40 +0000</pubDate>
		<dc:creator>ahume</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedredge.org/2005/09/sony-ericsson-d750i-mobile-phone/</guid>
		<description><![CDATA[I don't really follow the mobile phone market. I can't even tell you the model of my last Nokia, except that it was a long thin grey one, and when I got it I'd never heard of Bluetooth and I still thought WAP was really cool.]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t really follow the mobile phone market. I can&#8217;t even tell you the model of my last Nokia, except that it was a long thin grey one, and when I got it I&#8217;d never heard of Bluetooth and I still thought WAP was really cool.</p>
<p>Anyway, when it came time to upgrade my phone, instead of looking into all the options properly and really getting a handle on the market, I just popped over to <a href="http://www.andybudd.com">Andy Budd&#8217;s site</a> to see what phone he&#8217;d most recently bought. If there&#8217;s someone I trust when it comes to choosing the latest gagedtry, it is Andy. And he&#8217;d made all the tough <a href="http://www.andybudd.com/archives/2005/08/my_new_d750/">usablity vs. style vs. functionality decisions</a>some time ago, so who was I to question it.</p>
<p>It&#8217;s a little bit of a departure for me becuase I&#8217;ve been using Nokias for about the last 5 years, so it&#8217;s going to take me a bit of time to really get used to the software, particularly the predictive text, which is so different it&#8217;s driving me crazy.</p>
<p>One of the other reasons the Sony Ericsson models were appealing to me was how well they sync with OS X. As I said earlier I don&#8217;t follow mobile phone technology very closely, so here is a list of things I&#8217;m genuinely chuffed my phone can do, as I&#8217;ve never done anything like it before.</p>
<ul style="list-style:disc;">
<li>Connect to any mail server I like (including IMAP I believe).</li>
<li>Sync my address book without erasing half the contacts on my SIM.</li>
<li>Sync my freaking iCal with the calendar on my phone, including events, reminders and tasks.</li>
<li>Auto connect to BluePhoneElite. My Nokia needed approval to connect <strong>every</strong> time.</li>
</ul>
<p>That&#8217;s the pick of the bunch for me. I quite like the camera too, and it will definitely increase the number of photos I post to <a href="http://flickr.com">Flickr</a>over the next few weeks, which should be fun. The only thing I think it&#8217;s missing is an AM band radio. The FM works really well, but when I listen to radio it&#8217;s invariably for the sport of BBC Five, or Capital Gold. Still, it&#8217;s a small complaint.</p>
<p>One final thing I should mention is this terrific little web site called <a href="http://mobile.feisar.com/">mobile.feisar.com</a>. It&#8217;s dedicated to hints, tips, software, themes &amp; more for Apple Mac, iSync &amp; SonyEricsson users, and it&#8217;s been a real lifeline in helping me get everything syncing nicely with OS X.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andyhume.net/sony-ericsson-d750i-mobile-phone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
