<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ExtJS Javascript Library for Beginners!</title>
	<atom:link href="http://extperience.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://extperience.wordpress.com</link>
	<description>The Ext Javascript library for beginners, as I learn ExtJS so will you!</description>
	<lastBuildDate>Tue, 20 Sep 2011 08:09:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='extperience.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/2f1ed092f996b0be064b155829b041a0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>ExtJS Javascript Library for Beginners!</title>
		<link>http://extperience.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://extperience.wordpress.com/osd.xml" title="ExtJS Javascript Library for Beginners!" />
	<atom:link rel='hub' href='http://extperience.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Do you do usability testing?</title>
		<link>http://extperience.wordpress.com/2009/05/07/do-you-do-usability-testing/</link>
		<comments>http://extperience.wordpress.com/2009/05/07/do-you-do-usability-testing/#comments</comments>
		<pubDate>Thu, 07 May 2009 00:18:51 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[usability]]></category>
		<category><![CDATA[ramblings]]></category>

		<guid isPermaLink="false">http://extperience.wordpress.com/?p=128</guid>
		<description><![CDATA[Hello My Unknown Audience! I have a come to a point in my day job where I would like to know how the users are actually using our application. For this I need someone or some people to do some usability testing, not lots, but some. Anything in fact, would be better then where we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=128&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello My Unknown Audience!</p>
<p>I have a come to a point in my day job where I would like to know how the users are actually using our application. For this I need someone or some people to do some usability testing, not lots, but some. Anything in fact, would be better then where we are now.  Let me give you a bit of background.</p>
<p>We design and build a product in New Zealand, and it is marketed and sold to clients in the USA. We, the developers don&#8217;t garner a lot of feedback from our management about how the users actually use the software, just the list of what&#8217;s wrong with it and what needs to be added e.g. bugs and feature requests,  the usual whip cracking.</p>
<p>Very few of the feature requests come from actual end users. The features and product direction are driven by management, not users. Which in itself is not all bad, they know the market and have a good understanding of what the product needs to be able to do to keep up with our competitors. However, as a developer who wants to improve the users experience of the application I would love to start doing some usability testing. Nothing exciting like setting up a special room with darkened glass windows where the developers watch eagle eyed the subjects use the application. Some basic Q &amp; A with customers and someone observing how people use the application once a month would do!</p>
<div id="attachment_130" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-130" title="Usability Testing " src="http://extperience.files.wordpress.com/2009/05/police_3.jpg?w=300&#038;h=225" alt="Doing it wrong" width="300" height="225" /><p class="wp-caption-text">Doing it wrong</p></div>
<p>So my question to you is, if you do usability testing at your company, how do you do it and how has it changed your product, has it proved beneficial to your product?</p>
<p>If you have no idea what usability testing is, have a watch of this video: <a href="http://phpcamp.net/toolbar/the-least-you-can-do-about-usability" target="_self">Usability Testing, the least you can do</a>.</p>
<p>Answers on a post card <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=128&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/05/07/do-you-do-usability-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>

		<media:content url="http://extperience.files.wordpress.com/2009/05/police_3.jpg?w=300" medium="image">
			<media:title type="html">Usability Testing </media:title>
		</media:content>
	</item>
		<item>
		<title>Setting a Select box to a specified value</title>
		<link>http://extperience.wordpress.com/2009/05/05/setting-a-select-box-to-a-specified-value/</link>
		<comments>http://extperience.wordpress.com/2009/05/05/setting-a-select-box-to-a-specified-value/#comments</comments>
		<pubDate>Tue, 05 May 2009 04:55:14 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Ext / Javascript]]></category>

		<guid isPermaLink="false">http://extperience.wordpress.com/?p=124</guid>
		<description><![CDATA[Quick post on how to set a select box to a string string value, after a page has loaded. In the app I work with we have a list of search engines thus: Now when the page loads the first time, we have no way of determining what should be selected as the default, after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=124&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Quick post on how to set a select box to a string string value, after a page has loaded.</p>
<p>In the app I work with we have a list of search engines thus:</p>
<pre class="brush: xml;">

&lt;select name=&quot;_select_criteria&quot; id=&quot;_select_criteria&quot;&gt;
 &lt;option value=&quot;&quot; selected&gt;&lt;/option&gt;
 &lt;option value=&quot;Altavista&quot;&gt;Altavista&lt;/option&gt;
 &lt;option value=&quot;AOL&quot;&gt;AOL&lt;/option&gt;
 &lt;option value=&quot;Ask Jeeves&quot;&gt;Ask Jeeves&lt;/option&gt;
 &lt;option value=&quot;Comcast&quot;&gt;Comcast&lt;/option&gt;
 &lt;option value=&quot;Earthink&quot;&gt;Earthink&lt;/option&gt;
 &lt;option value=&quot;Google&quot;&gt;Google&lt;/option&gt;
 &lt;option value=&quot;Google Images&quot;&gt;Google Images&lt;/option&gt;
 &lt;option value=&quot;MSN&quot;&gt;MSN&lt;/option&gt;
 &lt;option value=&quot;Netscape&quot;&gt;Netscape&lt;/option&gt;
 &lt;option value=&quot;Windows Live Search&quot;&gt;Windows Live Search&lt;/option&gt;
 &lt;option value=&quot;Yahoo&quot;&gt;Yahoo&lt;/option&gt;
&lt;/select&gt;
</pre>
<p>Now when the page loads the first time, we have no way of determining what should be selected as the default, after something has been selected, that&#8217;s relativly easy to handle server side.</p>
<p>I wrote a quick piece of javascript to come up with a solution to setting the default value of the select box. Thus:</p>
<pre class="brush: jscript;">
Ext.onReady(function(){
 // set the search box to google as it defaults there.
 // query for the select criteria box.
 var selectbox = Ext.get('_select_criteria');

 Ext.each(selectbox.options, function(item, index){

// iterate and set the select box's selected index to whatever position google is.
 if(item.value == &quot;Google&quot;)
 {
     selectbox.selectedIndex = index;
 }
 });
});
</pre>
<p>That&#8217;s why I love Javascript! especially with Ext&#8230; Yum!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=124&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/05/05/setting-a-select-box-to-a-specified-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;m half way to being MySQL certified</title>
		<link>http://extperience.wordpress.com/2009/05/05/im-half-way-to-being-mysql-certified/</link>
		<comments>http://extperience.wordpress.com/2009/05/05/im-half-way-to-being-mysql-certified/#comments</comments>
		<pubDate>Tue, 05 May 2009 03:52:25 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://extperience.wordpress.com/?p=120</guid>
		<description><![CDATA[Hey Hey, If anyone still reads this after the other domain expired (I trust most of you updated your links/subscriptions) I&#8217;ll explain the reason behind my prolonged absence. I&#8217;ve been studying for a MySQL exam, the certified developer exam part 1. Ok not big news in itself, but it was big for me, I&#8217;ve given [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=120&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey Hey,</p>
<p>If anyone still reads this after the other domain expired (I trust most of you updated your links/subscriptions) I&#8217;ll explain the reason behind my prolonged absence.</p>
<p>I&#8217;ve been studying for a <a href="http://www.mysql.com/certification/candguide.html" target="_blank">MySQL exam</a>, the certified developer exam part 1. Ok not big news in itself, but it was big for me, I&#8217;ve given it 6 months and a heck of a lot of practice and I&#8217;m please to say I passed on Friday 1st May with a score of 61 / 70.Couple that with the fact that it&#8217;s probably the first legitimate study I&#8217;ve undertaken since being 17 and breezing through high school.</p>
<p>So, now that&#8217;s down I&#8217;m gonna hold up on the study for a short time as the Mrs and I are planning on getting busy, heh not like that&#8230; although&#8230;. hahha stop now. We&#8217;ve got some projects under way, wheels in motion that kind of thing that we want/need to focus on.</p>
<p>So After passing this exam, I&#8217;m think give it a gcouple of week / months and hit the books again for part two, by which time it&#8217;ll be defunct as Oracle will have totally owned MySQL.</p>
<p>Changing the subject a little, if you get the chance and are around in Auckland for the next few weeks, take the time to go to the <a href="http://comedyfestival.co.nz/" target="_blank">Comedy Festival</a>. You won&#8217;t regret it. We went to see the opening night&#8217;s &#8220;Big Show&#8221;, yeah it&#8217;s actually called &#8220;the big show&#8221; it was fantastic, the comedians included Dan Nightingale (Preston, UK &#8211; I used to live there, awesome funny chap), Lindsay Webb (Aussie, who heckled me for going to Mexico on honeymoon) and a guy called Carey Marx, who I think stole the show! His timing and delivery was just fantastic, all of these guys plus a couple more who I can&#8217;t remember made for a fantastic night out! So go see some comedy.</p>
<p>Time to get back to some javascripting posts now&#8230;</p>
<p>James</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=120&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/05/05/im-half-way-to-being-mysql-certified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;ve Moved!</title>
		<link>http://extperience.wordpress.com/2009/04/23/ive-moved/</link>
		<comments>http://extperience.wordpress.com/2009/04/23/ive-moved/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 23:18:34 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[the move]]></category>

		<guid isPermaLink="false">http://extperience.wordpress.com/?p=116</guid>
		<description><![CDATA[I've Moved!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=116&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey Ya&#8217;ll!</p>
<p>Ext-Perience has moved, although not far, it&#8217;s a change of theme and a change of URL so update your bookmarks and feed reader settings etc&#8230;</p>
<p>The 1018 domain was expiring at the end of April and since this was the only thing on that domain I decided to move home to wordpress.com for the managed hosting of this blog.</p>
<p>Everyone will get 301&#8242;d here from now on so hopefully I won&#8217;t loose any valuable traffic or linkage. If I do, not worries.</p>
<p>Hopefully this new hosted blog will inspire me to post more often as the other one started to run into technical difficulties due to the hosting provider, but you get what you pay for and I paid nothing so I have no room to complain.</p>
<p>By the way, I&#8217;m thinking of trying to push this blog a little more now they&#8217;ve released Ext Core, very cool idea guys&#8230; would anyone like to write a piece on here or a regular column? Leave a comment if you&#8217;re interest.</p>
<p>I know I don&#8217;t blog as often as I should but, my microblogging is second to none! Why not <a title="follow jameshd on twitter" href="http://ww.twitter.com/jameshd" target="_blank">follow me on Twitter </a>as well.</p>
<p>jameshd out.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=116&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/04/23/ive-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>Checking all your checkboxes with jQuery</title>
		<link>http://extperience.wordpress.com/2009/02/22/checking-checkboxes-jquery/</link>
		<comments>http://extperience.wordpress.com/2009/02/22/checking-checkboxes-jquery/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 23:52:20 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Ext / Javascript]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Ext]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.1018-media.com/ext-perience/?p=115</guid>
		<description><![CDATA[Ok I know this blog is geared towards ExtJS and I do expect you to lambast me for posting jQuery code snippets but, in my free time one lunch time I decided what it would be like to rewrite the ExtJS vertical checkbox examples I&#8217;ve been posting using jQuery. Turns out, there&#8217;s not a great [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=115&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok I know this blog is geared towards ExtJS and I do expect you to lambast me for posting jQuery code snippets but, in my free time one lunch time I decided what it would be like to rewrite the<a title="checking all checkboxes with ExtJS" href="http://www.1018-media.com/ext-perience/ext-javascript/checking-checkboxes-ext/"> ExtJS vertical checkbox examples</a> I&#8217;ve been posting using jQuery.</p>
<p>Turns out, there&#8217;s not a great deal of difference in the length of the code, maybe the clarity and readability is slightly improved with jQuery, although looking at it there&#8217;s not a great deal in it. So for shits n giggles here&#8217;s my jQuery code:</p>
<pre class="brush: jscript;">

&lt;script type=&quot;text/javascript&quot;&gt;

$(document).ready(function(){
$(&quot;#select_none&quot;).click(function(){
$(&quot;:checkbox&quot;).attr(&quot;checked&quot;, false);
$(&quot;#update_button&quot;).attr(&quot;disabled&quot;, true);
return false;
});

$(&quot;#select_all&quot;).click(function(){
$(&quot;:checkbox&quot;).attr(&quot;checked&quot;, true);
$(&quot;#update_button&quot;).attr(&quot;disabled&quot;, false);
return false;
});

// clear all checkboxes.
$(&quot;#select_none&quot;).click();

$(&quot;:checkbox&quot;).click(function(){
if($(this).attr(&quot;checked&quot;) == true)
{
if($(&quot;#update_button&quot;).attr(&quot;disabled&quot;)==true)
$(&quot;#update_button&quot;).attr(&quot;disabled&quot;, false);
}
else
{
if($(&quot;:checked&quot;).length == 0)
{
$(&quot;#update_button&quot;).attr(&quot;disabled&quot;, true);
}
}

})
});
</pre>
<p>FYI if you&#8217;re interested in checking out jQuery in more detail, have a look at the post over on Ajaxian filled with <a title="jQuery Videos by John Resig" href="http://ajaxian.com/archives/jquery-ajax-experience-framework-videos" target="_blank">jQuery videos</a> presented by John Resig himself.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=115&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/02/22/checking-checkboxes-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>Checking all your checkboxes with Ext</title>
		<link>http://extperience.wordpress.com/2009/02/19/checking-checkboxes-ext/</link>
		<comments>http://extperience.wordpress.com/2009/02/19/checking-checkboxes-ext/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 23:50:24 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Ext / Javascript]]></category>

		<guid isPermaLink="false">http://www.1018-media.com/ext-perience/?p=113</guid>
		<description><![CDATA[Following on from the previous post about vertical check box lists, here&#8217;s a little addition I made to add 3 buttons at the bottom, one to select all, one to select none and one to perform some kind of AJAX update. I don&#8217;t quite know why this took me a while to figure out, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=113&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following on from the previous post about <a title="Vertical Checkboxes" href="http://www.1018-media.com/ext-perience/ext-javascript/vertical-checkbox-groups/" target="_blank">vertical check box lists</a>, here&#8217;s a little addition I made to add 3 buttons at the bottom, one to select all, one to select none and one to perform some kind of AJAX update.<br />
I don&#8217;t quite know why this took me a while to figure out, but I thought it&#8217;d be worth sharing with the masses of readers I get to this blog, yeah right!</p>
<p>First the 3 buttons to perform the actions.</p>
<pre class="brush: xml;">

&lt;div style=&quot;text-align:right;margin:5px;clear:left&quot;&gt;&lt;input id=&quot;select_none&quot; onclick=&quot;selectNone();&quot; type=&quot;button&quot; value=&quot;Select None&quot; /&gt;
&lt;input id=&quot;select_all&quot; onclick=&quot;selectAll();&quot; type=&quot;button&quot; value=&quot;Select All&quot; /&gt;
&lt;input id=&quot;update_button&quot; onclick=&quot;update_charts();&quot; type=&quot;button&quot; value=&quot;Update Graphs&quot; /&gt;&lt;/div&gt;
</pre>
<p>Easy enough, we&#8217;re going to implement the select all and select none operations first. I use the onclick attribute because, well you&#8217;ll see don&#8217;t like calling an elements click() handler when it hasn&#8217;t actually been clicked!</p>
<pre class="brush: jscript;">
function selectAll(){
var checkboxes = Ext.query('input[id*=state_]');
Ext.each(checkboxes, function(obj_item){
obj_item.checked = true;
});

Ext.getDom('update_button').disabled = false;
}

function selectNone(){
var checkboxes = Ext.query('input[id*=state_]');
Ext.each(checkboxes, function(obj_item){
obj_item.checked = false;
});

Ext.getDom('update_button').disabled = true;
}
</pre>
<p>Two features I love here are the Ext.getDom() method and the query with the wildcard (*=)  pattern match. great stuff Ext team!</p>
<p>Now for the coolness, I wanted to write 1 block of code, which would add the event handler to each checkbox and take care of enabling / disabling the update button for me. Here&#8217;s what I came up with:</p>
<pre class="brush: jscript;">

// add disabling / enabling code.
Ext.onReady(function(){

// clear the check boxes , this is why it's a separate function
selectNone();

// add a click event handler to each checkbox.
var checkboxes = Ext.query('input[id*=state_]');
Ext.each(checkboxes, function(obj_item){

Ext.get(obj_item).on('click', function(event, checkbox){

up_button = Ext.getDom('update_button');
if(checkbox.checked == true){
if(up_button.disabled = true)
up_button.disabled = false;
}
else
{
if(Ext.query('input:checked').length == 0) // great place to use the selectors
up_button.disabled = true;
}
});
});
});
</pre>
<p>This code handles the disabling and enabling, it&#8217;s really simple to understand too, I&#8217;m pretty sure jQuery could do this with less code, due to it&#8217;s method chaining abilities. One thing I would have loved to do is this, but I don&#8217;t think it&#8217;s possible:</p>
<pre class="brush: jscript;">

// apply handler direct from the query() method. You can do this with jQuery.

var checkboxes = Ext.query('input[id*=state_]').on('click', function(event, checkbox){

up_button = Ext.getDom('update_button');

if(checkbox.checked == true){
if(up_button.disabled = true)
up_button.disabled = false;
}
else
{
if(Ext.query('input:checked').length == 0)
up_button.disabled = true;
}
});
});
</pre>
<p>Alas, it was not possible so I forfeit 1 extra line of code to get something working right, not a big deal really eh?</p>
<p><a title="Floow me on twitter" href="http://www.twitter.com/jameshd" target="_blank">James @twitter</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=113&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/02/19/checking-checkboxes-ext/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>Vertical Checkbox Groups</title>
		<link>http://extperience.wordpress.com/2009/02/04/vertical-checkbox-groups/</link>
		<comments>http://extperience.wordpress.com/2009/02/04/vertical-checkbox-groups/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 03:21:22 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Ext / Javascript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[formpanel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[vertical checkbox lists]]></category>

		<guid isPermaLink="false">http://www.1018-media.com/ext-perience/?p=108</guid>
		<description><![CDATA[While working on my usual project at work I encountered the need to solve the problem of having check boxes display in a vertical list, across several columns from a non numerically indexed PHP array. I came up with two solutions; one used Ext JS and one was plain PHP with some CSS thrown in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=108&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While working on my usual project at work I encountered the need to solve the problem of having check boxes display in a vertical list, across several columns from a non numerically indexed PHP array. I came up with two solutions; one used Ext JS and one was plain PHP with some CSS thrown in for good measure. One thing I noticed was that this task is not as easy as it seems.</p>
<p>Take for example the following array.</p>
<pre class="brush: php;">
$list =   array('AL'=&gt;&quot;Alabama&quot;,
'AK'=&gt;&quot;Alaska&quot;,
'AZ'=&gt;&quot;Arizona&quot;,
'AR'=&gt;&quot;Arkansas&quot;,
'CA'=&gt;&quot;California&quot;,
'CO'=&gt;&quot;Colorado&quot;,
'CT'=&gt;&quot;Connecticut&quot;,
'DE'=&gt;&quot;Delaware&quot;,
'DC'=&gt;&quot;District Of Columbia&quot;,
'FL'=&gt;&quot;Florida&quot;,
'GA'=&gt;&quot;Georgia&quot;

... and so on
</pre>
<p>I won&#8217;t paste the entire code as it&#8217;d just waste space.</p>
<p>To get that into a 4 column list proved rather tricky.  My first attempt was using an Ext.FormPanel, combined with PHP to generate the array. Not a glamorous solution by any means but it worked .</p>
<p>Here&#8217;s the code. It&#8217;s pretty self explanatory. are in mind the list variable from above.</p>
<pre class="brush: jscript;">
&lt;script&gt;

/**
* here we loop our $list variable creating some JSON objects
* which match the specification for an Ext.Checkbox
* The PHP you see just stops the last , being added to the list, IE chokes on that!
*
*/
var _list_items = [
&lt; ?php $lastKey = count($list); $i = 0; foreach($list as $program_id =&gt; $program_name): $i++?&gt;
{
boxLabel: '&lt; ?php echo ucwords($program_name);?&gt;',
name: 'programs[]',
inputValue : '&lt; ?php echo $program_id;?&gt;'
}&lt; ?php echo ($i !== $lastKey) ? &quot;,&quot; : &quot;&quot;;?&gt;
&lt; ?php endforeach;?&gt;
];

Ext.onReady(function(){

/*
Create our FormPanel variable in the usual panel way.
*/
var _fp = new Ext.FormPanel({
renderTo: Ext.getBody(),
frame:true,
title : 'States',
method: 'POST',
url : 'post.php', // dummy page, which spits back the variables passed through
width: 795,
autoHeight:true,
bodyStyle : {
padding: '10px'
},
/**
After seeing the examples of this it's pretty easy, the one thing to rememember is if you don't want a random
Colon (:) to appear in the top left when you enter no fieldLabel, use hideLabel, I think there's a bug for the Ext Boys.

*/
items : [{
xtype: 'checkboxgroup',
hideLabel : true,
id : &quot;program_checkboxes&quot;,
itemCls: 'x-check-group-alt',
columns: 5,
vertical: true,
items: _list_items // our php generated list.
}],
// add some funky buttons. bbar is such a cool config option!
bbar : [
'-&gt;',
new Ext.Button({
text : 'Clear',
handler : function(){
_fp.getForm().reset();
},
style : {
display: 'inline',
margin : '0px 5px'
}
}),
new Ext.Button({
text: 'Save',
style : {
display: 'inline',
margin : '0px 5px'
},
handler: function(){
if(_fp.getForm())
{
_fp.getForm().submit();
}
}

})]
});
});

&lt;/script&gt;
</pre>
<p>So that should be sufficient to get your Ext.FormPanel displaying check boxes vertically. What surprised me though, was the amount of processing it took to render! Reloading that simple script caused my Firefox to freeze on several occasions. Not sure why!</p>
<p>Anyway here&#8217;s how it looked;</p>
<p><img class="alignnone size-full wp-image-110" title="ext-formpanel-checkboxes" src="http://www.1018-media.com/ext-perience/wp-content/uploads/2009/02/ext-formpanel-checkboxes.png" alt="ext-formpanel-checkboxes" width="794" height="362" /></p>
<p>After the serveral crashes I decided to try some PHP to lighten my mood.  The solution I came up with is a little tricky to get your head around but, is very flexible, and doesn&#8217;t crash the browser so much. All it takes is a little PHP and CSS.</p>
<pre class="brush: php;">
&lt;div id=&quot;form-container&quot;&gt;

&lt; ?php

// set the maximum columns as a hard limit.

$max_cols = 4;

// determine how many rows to output per column
$perCol = round(ceil(count($list) / $max_cols));

// create two numerically indexed array of keys and values.
// this is important, because our initial array is indexed by strings, we need to re index them.
$names = array_values($list);
$ids = array_keys($list);

// now its a simple case of looping and creating a column out of a div each time.
?&gt;

&lt; ?php for ($i = 0; $i &lt; $max_cols; $i++):?&gt;
&lt;div class=&quot;programcol&quot;&gt;
&lt;ul&gt;
&lt; ?php for ($js = 0; $js &lt; $perCol; $js++):?&gt;
&lt; ?php if(strlen(current($names)) &gt; 0):?&gt;
&lt;li&gt;
&lt;input type=&quot;checkbox&quot; name=&quot;programs[]&quot; value=&quot;&lt;?php echo current($ids);?/&gt;&quot;&gt;
&lt;label&gt;&lt; ?php echo ucwords(current($names));?&gt;&lt;/label&gt;
&lt;/li&gt;
&lt; ?php endif;?&gt;
&lt; ?php next($names); next($ids);?&gt;
&lt; ?php endfor;?&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt; ?php endfor;?&gt;
&lt;/div&gt;

&lt; ?php
/**
* We loop down each time, iterating the array in sections, making a column out of each section.
* I'm sure this can be improved upon!
*/
?&gt;
</pre>
<p>That generates the divs&#8217; holding a list of columns, now to sprinkle on a little CSS to get the vertical styling.</p>
<pre class="brush: css;">
&lt;style&gt;
body
{
font-family:tahoma;
font-size:10px;
}

#form-container
{
width:795px;
min-height:250px;
max-height:500px;
float:left;

}

.programcol
{
float:left;
width:195px;
height:auto;
text-align:left;
display:inline;
clear:none;

}

.programcol li
{
margin: 4px 0px;
height:12px;
padding:0.25em
}

.programcol li label
{
margin-left:4px;
position:relative;
top:-2px
}

&lt;/style&gt;
</pre>
<p>&#8230;and we&#8217;re all good, we have vertical checkboxes across several columns! viola</p>
<p><img class="alignnone size-full wp-image-111" title="php-vertical-checkboxes" src="http://www.1018-media.com/ext-perience/wp-content/uploads/2009/02/php-vertical-checkboxes.png" alt="php-vertical-checkboxes" width="765" height="293" /></p>
<p>Hope you liked this.</p>
<p>James</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=108&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/02/04/vertical-checkbox-groups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>

		<media:content url="http://www.1018-media.com/ext-perience/wp-content/uploads/2009/02/ext-formpanel-checkboxes.png" medium="image">
			<media:title type="html">ext-formpanel-checkboxes</media:title>
		</media:content>

		<media:content url="http://www.1018-media.com/ext-perience/wp-content/uploads/2009/02/php-vertical-checkboxes.png" medium="image">
			<media:title type="html">php-vertical-checkboxes</media:title>
		</media:content>
	</item>
		<item>
		<title>Want some free subversion hosting?</title>
		<link>http://extperience.wordpress.com/2009/01/13/want-some-free-subversion-hosting/</link>
		<comments>http://extperience.wordpress.com/2009/01/13/want-some-free-subversion-hosting/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 02:11:37 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Randoms]]></category>
		<category><![CDATA[free stuff]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.1018-media.com/ext-perience/ext-javascript/want-some-free-subversion-hosting/</guid>
		<description><![CDATA[So did I&#8230; I came across these guys.: http://xp-dev.com/ Unlimited developers and projects!!! So far so good for my little project. In other news, Zoodle a site made by the guys I work with has gone live today, so if you&#8217;re looking for property reports in New Zealand, Zoodle is the place to get them. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=106&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So did I&#8230; I came across these guys.:</p>
<p><a title="Free SVN Hosting!" href="http://xp-dev.com/" target="_blank">http://xp-dev.com/</a></p>
<p>Unlimited developers and projects!!!<br />
So far so good for my little project.</p>
<p>In other news, Zoodle a site made by the guys I work with has gone live today, so if you&#8217;re looking for <a title="Property Reports for New Zealand" href="http://www.zoodle.co.nz" target="_blank">property reports in New Zealand</a>, Zoodle is the place to get them.</p>
<p>2 useful blog posts in 1 day eh!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=106&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/01/13/want-some-free-subversion-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>The Zend Framework is teaching me PHP Tricks!</title>
		<link>http://extperience.wordpress.com/2009/01/13/zend-framework-teaching-php-tricks/</link>
		<comments>http://extperience.wordpress.com/2009/01/13/zend-framework-teaching-php-tricks/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 23:10:48 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[casting]]></category>
		<category><![CDATA[loops]]></category>

		<guid isPermaLink="false">http://www.1018-media.com/ext-perience/?p=104</guid>
		<description><![CDATA[Just a &#8220;quickpress&#8221; &#8211; Loving the new WordPress Admin btw &#8211; great job! I&#8217;ve been writing PHP for a while and am a big hater of people who do not check their arrays are arrays before doing a foreach, and have their error reporting settings so high that they don&#8217;t notice the warning it generates [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=104&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a &#8220;quickpress&#8221; &#8211; Loving the new WordPress Admin btw &#8211; great job!</p>
<p>I&#8217;ve been writing PHP for a while and am a big hater of people who do not check their arrays are arrays before doing a foreach, and have their error reporting settings so high that they don&#8217;t notice the warning it generates when it fails.</p>
<p>Having read though some of the Zend Framework code I came across a way to rid yourself of the is_array() and and if(count($myArray) &gt; 0) checks before a foreach loop. It doesn&#8217;t totally solve the problem, but it will remove the &#8220;invalid arguments supplied for foreach loop&#8221; warning message we see.</p>
<p>Now if you&#8217;re sure you&#8217;ll be getting an array to deal with then there&#8217;s no real need for this. It&#8217;s more useable in the context of when you are unsure weather you will be getting a string or an array into your foreach loop.</p>
<p>Anyway, enough of this gay banter&#8230;here&#8217;s the code.</p>
<pre class="brush: php;">

foreach ( (array) $returnColumns as $returnColumn) {
if (in_array($returnColumn, $availableColumns)) {
$returnObject-&gt;{$returnColumn} = $this-&gt;_resultRow[$returnColumn];
}
}
</pre>
<p>That&#8217;s from the Zend_Auth class. It&#8217;s so cool though. In this particular function it accepts a string or an array as an arguement, this way we ensure foreach always has an array to deal with! Supercool trick if you ask me, and just to illustrate it a little further here&#8217;s somethignI made earlier:</p>
<pre class="brush: php;">

$mystring = &quot;abcdefg&quot;;
$array = (array) $mystring;

print_r($array);

// outputs

// Array
// (
//     [0] =&gt; abcdefg
// )
</pre>
<p>Yeah I know its nothing groundbreaking but, you learn something new everyday!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=104&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/01/13/zend-framework-teaching-php-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
		<item>
		<title>My Fake Page Rank Bar with CSS</title>
		<link>http://extperience.wordpress.com/2009/01/05/fake-page-rank-bar-css/</link>
		<comments>http://extperience.wordpress.com/2009/01/05/fake-page-rank-bar-css/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 16:21:35 +0000</pubDate>
		<dc:creator>jameshd</dc:creator>
				<category><![CDATA[Randoms]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[pagerank]]></category>

		<guid isPermaLink="false">http://www.1018-media.com/ext-perience/?p=103</guid>
		<description><![CDATA[Hey, The new year is getting off to a slow start, but here&#8217;s something that maybe of use to someone&#8230;We had a problem showing a PageRank bar on our site, something to do with IE bitching about non secure items, so to save an API call and bandwidth I made this. Now we just get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=103&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey,</p>
<p>The new year is getting off to a slow start, but here&#8217;s something that maybe of use to someone&#8230;We had a problem showing a PageRank bar on our site, something to do with IE bitching about non secure items, so to save an API call and bandwidth I made this. Now we just get the PageRank and display some div&#8217;s!</p>
<pre class="brush: xml;">

&lt; ?php
$pagerank = rand(0,10);

?&gt;

&lt;style&gt;
div.pagerank-holder
{
height:5px;
width:50px;
background-color:#f7f7f7;
border:1px #848484 solid;
float:left;
}

.rank
{
background-color:#009933;
height:5px;
float:left;
}

&lt;/style&gt;
&lt;p&gt;Page rank: &lt; ?php echo $pagerank;?&gt; &lt;/p&gt;
&lt;div class=&quot;pagerank-holder&quot;&gt;
&lt;div class=&quot;rank&quot; style=&quot;width:&lt;?php echo ($pagerank/10)*100;?&gt;%&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/extperience.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/extperience.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/extperience.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/extperience.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/extperience.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/extperience.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/extperience.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/extperience.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=extperience.wordpress.com&amp;blog=7480864&amp;post=103&amp;subd=extperience&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://extperience.wordpress.com/2009/01/05/fake-page-rank-bar-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3aa55f3630a95c40399846476afaa07a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jameshd</media:title>
		</media:content>
	</item>
	</channel>
</rss>
