<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Hot Koehl</title>
	
	<link>http://frankkoehl.com</link>
	<description>The more you know, the more you don't know</description>
	<lastBuildDate>Tue, 30 Jun 2009 19:48:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/HotKoehl" type="application/rss+xml" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/HotKoehl" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.addtoany.com/?linkname=Hot%20Koehl&amp;linkurl=http%3A%2F%2Ffeeds.feedburner.com%2FHotKoehl&amp;type=feed" src="http://www.addtoany.com/addfr-b.gif">Add to Any Feed Reader</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>How to be a great salesman</title>
		<link>http://frankkoehl.com/2009/06/how-to-be-a-great-salesman/</link>
		<comments>http://frankkoehl.com/2009/06/how-to-be-a-great-salesman/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 19:48:01 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For entrepreneurs]]></category>
		<category><![CDATA[business support]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[entrepreneur]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=629</guid>
		<description><![CDATA[Dave Ramsey is a fantastic businessman with an approach to businesses and finances that eschews what works over what&#8217;s hot. Given Wall Street&#8217;s track record of late, I&#8217;d say that&#8217;s a really good thing.
He&#8217;s got a good regular column called Dave Says, answering questions about personal finance and business (with a focus on entrepreneurs and [...]]]></description>
			<content:encoded><![CDATA[<p>Dave Ramsey is a fantastic businessman with an approach to businesses and finances that eschews <em>what works</em> over <em>what&#8217;s hot</em>. Given Wall Street&#8217;s track record of late, I&#8217;d say that&#8217;s a really good thing.</p>
<p>He&#8217;s got a good regular column called <a href="http://www.davesays.org">Dave Says</a>, answering questions about personal finance and business (with a focus on entrepreneurs and SOHO&#8217;s). The following came from <a href="http://www.davesays.org/index.cfm?FuseAction=dspContent&#038;intContentId=12471">the latest post</a>, and I thought it stood out as a gem for anyone who&#8217;s their own sales force:</p>
<blockquote><p>Dear Dave,<br />
What&#8217;s the key to becoming a great salesman?<br />
Brent</p>
<p>Dear Brent,<br />
I can sum it up in one word &#8211; serving. And don&#8217;t think for a second that serving means being subservient. I&#8217;m talking about being proactive, and making an effort to ensure that customers and potential customers alike are served well. Serving means you&#8217;re excited about what you have to offer, and you believe you&#8217;ve got a great product at a great price. It means you&#8217;re determined your customer is going to have a great experience, and if you happen to hit a bump in the road you will take care of it in a way that will make them forget it ever happened.</p>
<p>Serving is an attitude. You have to provide goods or services in a way that makes your customers willing to trade their time or money &#8211; things that are very precious to them &#8211; to interact with you and your business. You can pressure people if you want, but that&#8217;s going to lead to a dull and frustrating life of one-shot deals. But if you serve people well, you&#8217;ll not only have clients for life but they&#8217;ll also send all of their friends your way.</p>
<p>If you help enough people, Brent, and make that your first order of business, you&#8217;ll never have to worry about money. That&#8217;s a different attitude, isn&#8217;t it? But I&#8217;ve got news for you &#8211; it works!<br />
- Dave</p></blockquote>
<p>There&#8217;s a <a href="http://www.daveramsey.com/rss/?fuseaction=dspGetFeed&#038;strFeeds=DaveSays">feed for all the Dave Says articles</a>.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=629" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=-9WikgA1yfA:ewS1a89yzyo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=-9WikgA1yfA:ewS1a89yzyo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=-9WikgA1yfA:ewS1a89yzyo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=-9WikgA1yfA:ewS1a89yzyo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=-9WikgA1yfA:ewS1a89yzyo:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/06/how-to-be-a-great-salesman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change a select menu using jQuery</title>
		<link>http://frankkoehl.com/2009/06/change-select-menu-using-jquery/</link>
		<comments>http://frankkoehl.com/2009/06/change-select-menu-using-jquery/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 20:09:47 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=622</guid>
		<description><![CDATA[I don&#8217;t know why this is mind bending, but I seem to hit a wall every time I want to do page manipulations involving &#60;select&#62; boxes. Particularly, when I want to change the value selected. Based on the number of support posts I found, I&#8217;m clearly not alone.
There are two common ways to change the [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why this is mind bending, but I seem to hit a wall every time I want to do page manipulations involving <code>&lt;select&gt;</code> boxes. Particularly, when I want to <strong>change</strong> the value selected. Based on the number of support posts I found, I&#8217;m clearly not alone.</p>
<p>There are two common ways to change the value selected (i.e. displayed) in a <code>&lt;select&gt;</code> menu: alter the <code>selectedIndex</code> or the <code>value</code> attribute. Which one you use depends on the information you have at hand to alter the <code>&lt;select&gt;</code>.</p>
<p>The <code>selectedIndex</code> is an incremented number assigned to each <code>&lt;option&gt;</code>. in the <code>&lt;select&gt;</code>. In other words, <strong>it has no bearing whatsoever on the value of a given option.</strong> So if you know the <strong>order</strong> of the <code>&lt;option&gt;</code>&#8217;s in your <code>&lt;select&gt;</code> and can choose based on that, you can do this&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!-- CHANGE A SELECT BASED ON INDEX --&gt;
&lt;input id=&quot;change_value&quot; name=&quot;change_value&quot; type=&quot;button&quot; value=&quot;Change Menu&quot; /&gt;
&lt;select id=&quot;my_select_box&quot; name=&quot;var_name&quot;&gt;
  &lt;option selected=&quot;selected&quot; value=&quot;aaa&quot;&gt;Some value&lt;/option&gt; &lt;!-- index value of 0 --&gt;
  &lt;option value=&quot;bbb&quot;&gt;Some other value&lt;/option&gt; &lt;!-- index value of 1 --&gt;
&lt;/select&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {
  $('#change_value').click(function(){
    $('#my_select_box').attr('selectedIndex', 1);
    alert($('#my_select_box option:selected').text());
  });
});
&lt;/script&gt;</pre></div></div>

<p>Alternatively, you can change a <code>&lt;select&gt;</code> to match the <code>value</code> attribute of an <code>&lt;option&gt;</code>. This is probably a more common scenario..</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!-- CHANGE A SELECT BASED ON OPTION VALUE --&gt;
&lt;input id=&quot;change_value&quot; name=&quot;change_value&quot; type=&quot;button&quot; value=&quot;Change Menu&quot; /&gt;
&lt;select id=&quot;my_select_box&quot; name=&quot;var_name&quot;&gt;
  &lt;option selected=&quot;selected&quot; value=&quot;aaa&quot;&gt;Some value&lt;/option&gt; &lt;!-- index value of 0 --&gt;
  &lt;option value=&quot;bbb&quot;&gt;Some other value&lt;/option&gt; &lt;!-- index value of 1 --&gt;
&lt;/select&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {
  $('#change_value').click(function(){
    $('#my_select_box').val('bbb');
    alert($('#my_select_box option:selected').text());
  });
});
&lt;/script&gt;</pre></div></div>

<p>Hope that helps, it&#8217;s as much for you as it is me. <img src='http://frankkoehl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=622" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=mO8skts-k8U:ZO2eLzpDpNE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=mO8skts-k8U:ZO2eLzpDpNE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=mO8skts-k8U:ZO2eLzpDpNE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=mO8skts-k8U:ZO2eLzpDpNE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=mO8skts-k8U:ZO2eLzpDpNE:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/06/change-select-menu-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entrepreneurs – think like this guy</title>
		<link>http://frankkoehl.com/2009/06/entrepreneurs-think-like-this-guy/</link>
		<comments>http://frankkoehl.com/2009/06/entrepreneurs-think-like-this-guy/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:41:30 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For entrepreneurs]]></category>
		<category><![CDATA[get inspired]]></category>
		<category><![CDATA[startups]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=615</guid>
		<description><![CDATA[In a great article discussing how to demo a product to investors, Jason Calacanis says the following under the heading &#8220;The best products take less than five minutes to demo&#8221;&#8230;
Steve Jobs does take the demo details to a fairly detailed level, but you and I are not Steve Jobs. There is only one Steve Jobs [...]]]></description>
			<content:encoded><![CDATA[<p>In a great article discussing <a href="http://www.techcrunch.com/2008/08/09/how-to-demo-your-startup">how to demo a product</a> to investors, Jason Calacanis says the following under the heading &#8220;The best products take less than five minutes to demo&#8221;&#8230;</p>
<blockquote><p>Steve Jobs does take the demo details to a fairly detailed level, but you and I are not Steve Jobs. There is only one Steve Jobs and there is only one Apple. You’re never going to build something as cool as Steve, and as such there is no need for you to talk about your product for five or ten minutes.</p></blockquote>
<p>In the comments, I found this response from user &#8220;COP&#8221;:</p>
<blockquote><p>WTF????? WHY NOT?</p></blockquote>
<p>My thoughts exactly. There&#8217;s exactly zero rules, official or unofficial, that say you can&#8217;t be as cool as Steve Jobs and build products with equivalent coolness.</p>
<p>This type of rhetoric happens a lot &mdash; presenting a major player in a given market as an insurmountable behemoth. We as entrepreneurs do it in our heads all the time. It&#8217;s never helpful, but more importantly it&#8217;s never <strong>true</strong>.</p>
<p>Take Calacanis&#8217; example in this article. You don&#8217;t have to go back too far to find a time when Apple wasn&#8217;t the epitome of cool. In my opinion, Apple machines after the IIe were out-and-out crap until they hit another stride with OSX, which came out in <strong>1999</strong>. I don&#8217;t recall seeing any Apple&#8217;s in school prior to that. I should know, I graduated high school in &#8216;99! Did you know the first iPod was released in 2001, less than 10 years ago? That&#8217;s a helluva lotta time where we can&#8217;t account for any Steve Job coolness.</p>
<p>The correct attitude is that of our friend COP, &#8220;Why not?&#8221; In fact I&#8217;m willing to bet that ol&#8217; Steve said that a few times along the way as well.</p>
<p>To think any less, to see your competition as insurmountable, is surely a road to failure.</p>
<p><strong>P.S.</strong> Note: Jobs is one of the most epic geeks in history, no question. Apple has been a successful company since its founding, but definitely wandered the wilderness through the late 80&#8217;s and 90&#8217;s, which does not fit Calacanis&#8217; rhetoric. My goal here is to topple Calacanis&#8217; logic, not Jobs. Mac cultists, be at ease.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=615" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=yk62_MZosbg:8anWfnz85do:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=yk62_MZosbg:8anWfnz85do:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=yk62_MZosbg:8anWfnz85do:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=yk62_MZosbg:8anWfnz85do:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=yk62_MZosbg:8anWfnz85do:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/06/entrepreneurs-think-like-this-guy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comments fixed</title>
		<link>http://frankkoehl.com/2009/06/comments-fixed/</link>
		<comments>http://frankkoehl.com/2009/06/comments-fixed/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 19:40:07 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For everyone]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=602</guid>
		<description><![CDATA[Just discovered that comments have been borked for a bit. Sorry about that.
Share]]></description>
			<content:encoded><![CDATA[<p>Just discovered that comments have been borked for a bit. Sorry about that.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=602" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=7yqMCYGTLho:5zGfWKopHTE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=7yqMCYGTLho:5zGfWKopHTE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=7yqMCYGTLho:5zGfWKopHTE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=7yqMCYGTLho:5zGfWKopHTE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=7yqMCYGTLho:5zGfWKopHTE:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/06/comments-fixed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using jQuery Alerts plugin to submit a form</title>
		<link>http://frankkoehl.com/2009/06/using-jquery-alerts-plugin-submit-form/</link>
		<comments>http://frankkoehl.com/2009/06/using-jquery-alerts-plugin-submit-form/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 16:03:32 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=593</guid>
		<description><![CDATA[jQuery is awesome. The jQuery Alerts plugin is also awesome. One of the most immediate and obvious uses of the pair is presenting a spiffy confirmation box before submitting a form. For example, I recently implemented this setup on a form that ultimately deletes data. I couldn&#8217;t find a detailed example for this setup, leading [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jquery.com/">jQuery</a> is awesome. The <a href="http://abeautifulsite.net/notebook/87">jQuery Alerts</a> plugin is also awesome. One of the most immediate and obvious uses of the pair is presenting a spiffy confirmation box before submitting a form. For example, I recently implemented this setup on a form that ultimately deletes data. I couldn&#8217;t find a detailed example for this setup, leading to much trial and error. Here&#8217;s what worked for me.</p>
<p>First the form&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;form name=&quot;action_delete&quot; action=&quot;/delete_stuff.php&quot; method=&quot;post&quot;&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;option1&quot; value=&quot;1&quot; /&gt; Option 1&lt;br /&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;option2&quot; value=&quot;1&quot; /&gt; Option 2&lt;br /&gt;
  &lt;input type=&quot;button&quot; name=&quot;fake-submit&quot; value=&quot;Delete&quot; onclick=&quot;confirmDelete();&quot; /&gt;
&lt;/form&gt;</pre></div></div>

<p>Take note that we are dealing with a normal form, nothing fancy about the form action, the inputs, etc. The only thing special going on here is that we&#8217;ve substituted an actual <code>&lt;input type="submit" ... /&gt;</code> button for a plain <code>button</code> type and attached an <code>onclick</code> event.</p>
<p>Now the JavaScript&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> confirmDelete<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  jConfirm<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Are you sure you want to delete this stuff?'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Please Confirm'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form[name='action_delete']&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// [ ... ]</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Assuming you understand the syntax for jQuery Alert, the <code>confirmDelete()</code> function is fairly straightforward. It&#8217;s everything <strong>around</strong> the <code>jConfirm()</code> call that gave me a headache.</p>
<p>Go back to the fact that we&#8217;re using a regular button and <code>onclick</code>, instead of a submit button and the <code>onsubmit</code> event. Nested jQuery functions, like <code>jConfirm()</code> and its third argument, have always caused me problems with normal JavaScript events, <code>onsubmit</code> in particular. If not done properly, the submit event is not &#8220;held up&#8221; by the confirmation dialog, input validation, etc. Such was the case here, so the only submit event occurs in the JavaScript after getting validation from the prompt.</p>
<p>Also note the position of <code>confirmDelete()</code>: <strong>outside</strong> of the jQuery &#8220;document ready&#8221; block. If you put it inside, it won&#8217;t work.</p>
<p>I explicitly identified the form to submit (line 4 in JavaScript) for sake of code clarity. This layout can easily be modified to dynamically process multiple forms.</p>
<p>Finally, note that this setup requires JavaScript to work, i.e. <strong>it does not gracefully degrade</strong>. In my opinion, the situations where this is actually a problem are limited. Every major browser on the market fully supports JavaScript, and enables it by default. Unless your target audience is 100% mobile (you should build a separate interface for your mobile app anyway) or in a high security sector, assuming its presence is a very safe bet.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=593" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=Y7stIkTjpAk:z9-7XhP7X0Q:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=Y7stIkTjpAk:z9-7XhP7X0Q:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=Y7stIkTjpAk:z9-7XhP7X0Q:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=Y7stIkTjpAk:z9-7XhP7X0Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=Y7stIkTjpAk:z9-7XhP7X0Q:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/06/using-jquery-alerts-plugin-submit-form/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Usability Fail: Windows Live Registration</title>
		<link>http://frankkoehl.com/2009/06/usability-fail-windows-live-registration/</link>
		<comments>http://frankkoehl.com/2009/06/usability-fail-windows-live-registration/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 15:25:10 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For entrepreneurs]]></category>
		<category><![CDATA[For techies]]></category>
		<category><![CDATA[Microsoft sucks]]></category>
		<category><![CDATA[usability fail]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=584</guid>
		<description><![CDATA[While my MS complaints are (rightly) focused on their desktop apps, I knew Microsoft would end up in this series at some point. However, even I was surprised at how quickly it happened. These guys can&#8217;t help but do stupid things in pursuit of copycatting their competitors. Here&#8217;s a screenshot several steps deep into the [...]]]></description>
			<content:encoded><![CDATA[<p>While my MS complaints are (rightly) focused on their desktop apps, I knew Microsoft would end up in this series at some point. However, even I was surprised at how quickly it happened. These guys can&#8217;t help but do stupid things in pursuit of copycatting their competitors. Here&#8217;s a screenshot several steps deep into the <a href="https://signup.live.com/">Windows Live registration</a>&#8230;</p>
<p><a href="http://frankkoehl.com/wp-content/uploads/msphail.png"><img class="alignnone size-medium wp-image-589" title="Live Credit Card Challenge" src="http://frankkoehl.com/wp-content/uploads/msphail-300x267.png" alt="Live Credit Card Challenge" /></a></p>
<p>Yes, that page is requesting a credit card number. No, Live does not have a monthly subscription fee. As the page states, they simply want to ensure you&#8217;re an adult.</p>
<p>As any savvy ecommerce retailer can tell you, the most challenging part of the online sale is the checkout. It&#8217;s easy to throw virtual items in a virtual shopping cart, but you have to <strong>commit</strong> when it comes time to pay. So site owners try all kinds of things to minimize the hurdle and get them through the messy part as quickly and effortlessly as possible, lest they change their mind. Meanwhile, Microsoft is taking this same large mental hurdle and trying to turn it into a speed bump. I can&#8217;t think of a faster way to send potential new users running for the hills.</p>
<p>Don&#8217;t get me wrong, using a credit card challenge as identification is perfectly fine when there&#8217;s a darn good reason for it; using it to ask &#8220;are you an adult&#8221; before opening a free messaging account is not one of them. Why is a kid with a Live account a problem? Are the risks greater than other such messaging services, or the Net at large? I suspect that the Live team is simply trying to avoid the legal hassles, but haven&#8217;t AIM, Google Chat, Yahoo IM, and their own MSN operated just fine for years without an age challenge? I think the answer is an obvious &#8220;no&#8221; to all of the above.</p>
<p>Were it me, I&#8217;d take my chances facing legal nonsense and give kids a <strong>greater level</strong> of access than adults. Children and young adults most rapidly adopt and embrace new technologies. IM, P2P, txt&#8217;ing, Facebook&#8230;all of these tools owe most of their success to users who, by and large, do not have credit card numbers. To willing cut them out of the deal is to quite literally cut your chances of success by more than half.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=584" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=DkPKF6ROl0Q:1hZDBk8qPvw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=DkPKF6ROl0Q:1hZDBk8qPvw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=DkPKF6ROl0Q:1hZDBk8qPvw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=DkPKF6ROl0Q:1hZDBk8qPvw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=DkPKF6ROl0Q:1hZDBk8qPvw:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/06/usability-fail-windows-live-registration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What 255 characters looks like</title>
		<link>http://frankkoehl.com/2009/05/what-255-characters-looks-like/</link>
		<comments>http://frankkoehl.com/2009/05/what-255-characters-looks-like/#comments</comments>
		<pubDate>Wed, 27 May 2009 00:11:07 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=579</guid>
		<description><![CDATA[&#8220;Should I use TEXT or VARCHAR field here?&#8221;
I&#8217;ve lost count of the number of times that I asked myself this question when putting together database structures. Since the maximum a VARCHAR can hold is 255, it becomes a question of whether or not the data you&#8217;re saving will be any longer than that. Sometimes that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Should I use <code><a href="http://dev.mysql.com/doc/refman/5.0/en/blob.html">TEXT</a></code> or <code><a href="http://dev.mysql.com/doc/refman/5.0/en/char.html">VARCHAR</a></code> field here?&#8221;</p>
<p>I&#8217;ve lost count of the number of times that I asked myself this question when putting together database structures. Since the maximum a VARCHAR can hold is 255, it becomes a question of whether or not the data you&#8217;re saving will be any longer than that. Sometimes that&#8217;s an easy call (phone number = VARCHAR; email body = TEXT), other times its blurry (verbose error logs, foreign-language data sets, user-submitted comments, etc).</p>
<p><em>&#8220;So what? Why not just use TEXT and be done with it?&#8221;</em></p>
<p>It&#8217;s true that in most cases it won&#8217;t make a difference. However, if you need to <strong>index and search</strong> the field, you should think carefully before blindly using TEXT. The data in TEXT type fields are stored outside the table itself, using only a few bytes for pointer information. This means that <a href="http://forums.mysql.com/read.php?24,105964,105964">TEXT fields are not indexed, while VARCHAR fields are</a>. This can have a tremendous effect on your SQL query speeds, as generally larger TEXT fields increase query time exponentially. Even if we take indexing out of the picture, the external storage of TEXT fields means that you&#8217;ll still see generally faster searches with VARCHAR.</p>
<p>Which brings us back to the original problem: when is a 255 character cap good enough? See for yourself. Below you&#8217;ll find a block of <a href="http://www.lipsum.com/">lorem ispum</a> text that&#8217;s exactly 255 characters long (spaces count):</p>
<blockquote><p>Lorem ipsum dolor sit amet, nonummy ligula volutpat hac integer nonummy. Suspendisse ultricies, congue etiam tellus, erat libero, nulla eleifend, mauris pellentesque. Suspendisse integer praesent vel, integer gravida mauris, fringilla vehicula lacinia non</p></blockquote>
<p>If you&#8217;re like me, you&#8217;ll look at that and say, &#8220;That&#8217;s a lot more than I thought.&#8221;</p>
<p>Another way to look at it: <a href="http://www.rfc-editor.org/rfc/rfc2822.txt">RFC2822</a> says that a subject line may contain 998 total characters, with a max of 78 per line. Most mail clients don&#8217;t support multi-line subjects, so 78 characters is the practical limit you&#8217;ll find in most cases.</p>
<p>So if you ever find yourself doing that fuzzy-string-length-guestimation math in your head, bookmark this page to add a visual to the guesswork as well.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=579" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=LBLAPAc6bX4:R9ZX_IWblp4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=LBLAPAc6bX4:R9ZX_IWblp4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=LBLAPAc6bX4:R9ZX_IWblp4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=LBLAPAc6bX4:R9ZX_IWblp4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=LBLAPAc6bX4:R9ZX_IWblp4:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/05/what-255-characters-looks-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go Bullets!</title>
		<link>http://frankkoehl.com/2009/05/go-bullets/</link>
		<comments>http://frankkoehl.com/2009/05/go-bullets/#comments</comments>
		<pubDate>Thu, 21 May 2009 15:42:35 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For everyone]]></category>
		<category><![CDATA[for fun]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=575</guid>
		<description><![CDATA[My brother, Patrick, plays lacrosse for Gettysburg College. Last weekend they beat Stevenson University &#8212; an upset by the stats, but they owned the game &#8212; which advanced them to the NCAA Division III Championship.
They&#8217;ll be playing Cortland at Gillette Stadium, home of the New England Patriots, on Sunday for the title. The game will [...]]]></description>
			<content:encoded><![CDATA[<p>My brother, Patrick, plays lacrosse for Gettysburg College. Last weekend they <a href="http://www.gettysburgtimes.com/articles/2009/05/21/sports/doc4a153a57ec07e720319245.txt">beat Stevenson University</a> &mdash; an upset by the stats, but they owned the game &mdash; which advanced them to the NCAA Division III Championship.</p>
<p>They&#8217;ll be playing Cortland at Gillette Stadium, home of the New England Patriots, on Sunday for the title. The game will be televised on CBS College Sports Network.</p>
<p>So yeah, my brother? Kind of a big deal. </p>
<p>Good luck, bud! Kick ass!</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=575" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=d2QnLMuCGHs:5f7PRM8JQbM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=d2QnLMuCGHs:5f7PRM8JQbM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=d2QnLMuCGHs:5f7PRM8JQbM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=d2QnLMuCGHs:5f7PRM8JQbM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=d2QnLMuCGHs:5f7PRM8JQbM:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/05/go-bullets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE: You’re still doing it wrong…</title>
		<link>http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/</link>
		<comments>http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/#comments</comments>
		<pubDate>Thu, 14 May 2009 18:59:26 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[Microsoft sucks]]></category>
		<category><![CDATA[usability fail]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=530</guid>
		<description><![CDATA[While working on the file manager section of the Fwd:Vault website, I decided to do a quick check on cross-browser compatibility. The following screenshots are of the same page using the same HTML layout, CSS definitions, etc&#8230;
At this point in my career, I don&#8217;t think words can express how much I utterly loathe Microsoft&#8217;s IE [...]]]></description>
			<content:encoded><![CDATA[<p>While working on the file manager section of the Fwd:Vault website, I decided to do a quick check on cross-browser compatibility. The following screenshots are of the same page using the same HTML layout, CSS definitions, etc&#8230;</p>

<a href='http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/vault-firefox/' title='vault-firefox'><img width="150" height="150" src="http://frankkoehl.com/wp-content/uploads/vault-firefox-150x150.png" class="attachment-thumbnail" alt="Firefox 3.0.10" title="vault-firefox" /></a>
<a href='http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/vault-chrome/' title='vault-chrome'><img width="150" height="150" src="http://frankkoehl.com/wp-content/uploads/vault-chrome-150x150.png" class="attachment-thumbnail" alt="Google Chrome 1.0.x" title="vault-chrome" /></a>
<a href='http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/vault-safari/' title='vault-safari'><img width="150" height="150" src="http://frankkoehl.com/wp-content/uploads/vault-safari-150x150.png" class="attachment-thumbnail" alt="Safari 3.2.1 (windows)" title="vault-safari" /></a>
<a href='http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/vault-opera/' title='vault-opera'><img width="150" height="150" src="http://frankkoehl.com/wp-content/uploads/vault-opera-150x150.png" class="attachment-thumbnail" alt="Opera 9.64" title="vault-opera" /></a>
<a href='http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/vault-ie-fail/' title='vault-ie-fail'><img width="150" height="150" src="http://frankkoehl.com/wp-content/uploads/vault-ie-fail-150x150.png" class="attachment-thumbnail" alt="IE 8 (yeah, the latest one)" title="vault-ie-fail" /></a>

<p>At this point in my career, I don&#8217;t think words can express how much I utterly loathe Microsoft&#8217;s IE team (and Microsoft in general) for their completely overt dismissal of browser standards. But that won&#8217;t stop me from trying, so listen up, you morons.</p>
<p>Building a website is an incredibly complex task, and that complexity increases almost daily. Today, all my sites include code written in HTML, CSS, JavaScript, SQL, and PHP (or ASP, JSP, etc). Nuance aside, that&#8217;s five languages! All intermingled to accomplish one goal: put a page in front of a user.</p>
<p>On top of that, I have to worry about abstract concepts like SEO, caching, file sizes/load times, traffic stats, usability, server uptime, SSL, data integrity, backups, security&#8230;I could keep going. I have enough to do without having to worry about your browser — I <strong>check</strong> the others, I only <strong>worry</strong> about your browser — mucking up my display or breaking my Javascript. Less time spent dealing with browser compatibility issues equals more time building a better browsing experience, which is good for everyone, even you.</p>
<p>Furthermore, I don&#8217;t like the notion of &#8220;pushing&#8221; a user toward or away from any given browser. As a web developer and webmaster, I am in the business of delivering my site content. Having to urge people to choose a better browser is a distraction at best, lost traffic at worst. From the perspective of my users, it&#8217;s better to just handle the problems quietly in the background. I think this same mindset is why you don&#8217;t see overwhelming support (yet) for movements like <a href="http://www.wedontsupportie.com/">WeDontSupportIE.com</a>.</p>
<p>However, as my example above starkly displays, there are now four solid mainstream alternatives out there, and <a href="http://en.wikipedia.org/wiki/List_of_web_browsers">plenty of smaller options</a> as well. That says nothing about the inroads of Mac and Linux into the OS market. How much longer do you think &#8220;IE inertia&#8221; will carry?</p>
<p>In short, when it comes to HTML/CSS interpretation and display, <strong>IE should be in lock step with competitors</strong>. If you do that, you can essentially remove web developers from the browser debate, which is big for you because you&#8217;re not winning any popularity contests with us. Differentiate yourself from the competition by creating a better user experience, and let the end user decide.</p>
<p>Of course I&#8217;m not holding my breath, so one of these buttons my end up on Fwd:Vault before launch<br />
<a href="http://www.wedontsupportie.com/"><img src="http://www.wedontsupportie.com/buttons/88x31/18.gif" alt="" /></a><br />
I haven&#8217;t decided yet&#8230;</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=530" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=s4qCkfrTuUw:TV15O3FCgGw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=s4qCkfrTuUw:TV15O3FCgGw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=s4qCkfrTuUw:TV15O3FCgGw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=s4qCkfrTuUw:TV15O3FCgGw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=s4qCkfrTuUw:TV15O3FCgGw:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/05/ie-youre-still-doing-it-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Translating PHP error constants</title>
		<link>http://frankkoehl.com/2009/05/translating-php-error-constants/</link>
		<comments>http://frankkoehl.com/2009/05/translating-php-error-constants/#comments</comments>
		<pubDate>Tue, 12 May 2009 21:12:16 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[fwdvault]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=520</guid>
		<description><![CDATA[I wanted to log all the errors thrown out by Fwd:Vault processes to ensure that any bugs I don&#8217;t catch myself bubble to the top very quickly. To get started, I replaced PHP&#8217;s default error handling with a custom error handler function, which simply logs the error in a MySQL table before passing it along [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to log all the errors thrown out by <a href="http://fwdvault.com">Fwd:Vault</a> processes to ensure that any bugs I don&#8217;t catch myself bubble to the top very quickly. To get started, I replaced PHP&#8217;s default error handling with a custom error handler function, which simply logs the error in a MySQL table before passing it along to the normal internal error handler.</p>
<p>Later, I&#8217;m going to add non-error notices to the mix, and set up an RSS feed to output these errors, allowing me real-time updates on overall system health.</p>
<p>If the error handling stuff sounds like Greek, read up before going further:</p>
<ul>
<li><a href="http://www.php.net/manual/en/book.errorfunc.php">PHP error handling</a></li>
<li><code><a href="http://www.php.net/manual/en/function.set-error-handler.php">set_error_handler()</a></code></li>
<li><code><a href="http://www.php.net/manual/en/function.error-reporting.php">error_reporting()</a></code></li>
<li><code><a href="http://www.php.net/manual/en/function.trigger-error.php">trigger_error()</a></code></li>
</ul>
<p>When PHP throws any kind of error, the error is assigned an error level, which can be expressed in two ways: an integer or a predefined constant. The constant represents the integer, making the two completely interchangeable. However if you build a custom error handler, you are only given the integer, which doesn&#8217;t automagically translate back to the constant value. It&#8217;s a heckuva lot easier to recognize <code>E_USER_ERROR</code> instead of the integer <code>256</code>, so I want to store that error constant for reading purposes. If you find yourself looking at error numbers, and want the matching constant string, use this block of code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$errno</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_PARSE'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_NOTICE'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">16</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_CORE_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">32</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_CORE_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">64</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_COMPILE_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">128</span><span style="color: #339933;">:</span>   <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_COMPILE_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">256</span><span style="color: #339933;">:</span>   <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">512</span><span style="color: #339933;">:</span>   <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1024</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_NOTICE'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2048</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_STRICT'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4096</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_RECOVERABLE_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">8192</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_DEPRECATED'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">16384</span><span style="color: #339933;">:</span> <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_DEPRECATED'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">30719</span><span style="color: #339933;">:</span> <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_ALL'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_UNKNOWN'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This will give you a string in <code>$e_type</code> matching the proper constants. The <code>switch</code> block accounts for <a href="http://www.php.net/manual/en/errorfunc.constants.php">all the current PHP constants</a> as of this posting, plus a catch-all <code>E_UNKNOWN</code> in case you&#8217;re doing something <strong>really</strong> weird.</p>
<p>Now let&#8217;s add some perspective to this code block. Here&#8217;s an sample custom error handler that grabs the constant string for logging purposes and outputs the error to the screen. The internal handler is bypassed in this example, since we don&#8217;t need it to do anything (note how the function kills page processing when a fatal error occurs). We&#8217;ll also set this custom function as the default error handler.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> custom_error_handler<span style="color: #009900;">&#40;</span><span style="color: #000088;">$errno</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errstr</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errfile</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errline</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$errno</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_PARSE'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">:</span>     <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_NOTICE'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">16</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_CORE_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">32</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_CORE_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">64</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_COMPILE_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">128</span><span style="color: #339933;">:</span>   <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_COMPILE_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">256</span><span style="color: #339933;">:</span>   <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">512</span><span style="color: #339933;">:</span>   <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_WARNING'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1024</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_NOTICE'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2048</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_STRICT'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4096</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_RECOVERABLE_ERROR'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">8192</span><span style="color: #339933;">:</span>  <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_DEPRECATED'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">16384</span><span style="color: #339933;">:</span> <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_USER_DEPRECATED'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">30719</span><span style="color: #339933;">:</span> <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_ALL'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$exit_now</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>    <span style="color: #000088;">$e_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'E_UNKNOWN'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;<span style="color: #006699; font-weight: bold;">$e_type</span>&lt;/strong&gt; &amp;mdash; <span style="color: #006699; font-weight: bold;">$errstr</span> on line <span style="color: #006699; font-weight: bold;">$errline</span> in file <span style="color: #006699; font-weight: bold;">$errfile</span>&lt;br /&gt;n&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">//send_to_log(&quot;$e_type - $errstr on line $errline in file $errfile&quot;);</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$exit_now</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// Don't execute PHP internal error handler</span>
  <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">set_error_handler</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'custom_error_handler'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>At this point you have all the information necessary to do whatever you want with the error. A future post will expand on that <code>send_to_log()</code> statement, but serves as a placeholder example.</p>
<p><a href="http://frankkoehl.com/?ibsa=share&id=520" id="share-link-">Share</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=V2aAs2mqTpk:qLHb4fHlEMI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=V2aAs2mqTpk:qLHb4fHlEMI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=V2aAs2mqTpk:qLHb4fHlEMI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/HotKoehl?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/HotKoehl?a=V2aAs2mqTpk:qLHb4fHlEMI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/HotKoehl?i=V2aAs2mqTpk:qLHb4fHlEMI:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2009/05/translating-php-error-constants/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
