The Wisdom of Chuck

This post is more than 2 years old.

A little while ago Andrew Powell of Universal Mind released the Chuck Norris Fact Web Service. This is a critical feature that has been missing from the Internet for some time. Frankly, I do not know how we have survived without the wisdom of Chuck Norris.

I whipped up a quick AIR application that you can run on your desktop. Every 5 seconds it will load a new pearl of wisdom from the man we know as Chuck. Please note that I'm way rusty with Adobe AIR. I haven't had the chance to play with it much lately, but dang it - I love that I was able to write this up in like 5 minutes. I spent more time making some dumb mistakes in Spry then I did on the "AIR-ness" of it. Enjoy. (As I still haven't updated IIS to let .air files worked, I renamed to a .zip.)

The entire code (minus Spry libraries) is below:

<html>

<head> <script type="text/javascript" src="AIRAliases.js"></script> <script type="text/javascript" src="spryjs/xpath.js"></script> <script type="text/javascript" src="spryjs/SpryData.js"></script>

<script type="text/javascript"> var myurl = "http://www.infoaccelerator.net/chuckFacts/FactService.cfc?method=getCurrentFact&returnformat=plain";

function callHandler(req){ var result = req.xhRequest.responseText; var sp = Spry.$("wisdom"); sp.innerText = result; }

function getWisdom(){ Spry.Utils.loadURL("GET", myurl, true, callHandler); }

function doLoad(){ getWisdom(); setInterval(getWisdom, 5000); } </script> <style> .wisdom { font-family: times; font-style: italic; } </style> </head>

<body onload="doLoad();"> <h3>The Wisdom of Chuck Norris</h3> <span id="wisdom" class="wisdom"></span> </body> </html>

Download attached file.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Gary Gilbert posted on 12/1/2007 at 1:16 AM

Ray you have a typo..it's Chuck Norris not Churck Norris :)

Comment 2 by Raymond Camden posted on 12/1/2007 at 1:22 AM

Chuck doesn't make typos. Chuck changes the English language to match his spelling.

Comment 3 by Troy Allen posted on 12/1/2007 at 1:31 AM

"Evolution" is my fav...laughed out loud at work. I loved it when Conan O'Brien had the "Chuck Norris Lever":

http://www.popoholic.com/20...

Have a great weekend everyone!

Comment 4 by Luke Kilpatrick posted on 12/1/2007 at 4:35 AM

Great little application, lots of fun as well. Well over due i think :)

Comment 5 by Rob posted on 12/1/2007 at 4:50 AM

Cool ... although when I saw the title on my Goog feed, I thought it was going to be the wisdom of Chuck Bartowski, but that's OK.