<?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>E-com DevBlog</title>
	
	<link>http://dev.tonic1394.com</link>
	<description>Spider-ball-vacuum</description>
	<lastBuildDate>Wed, 01 Sep 2010 22:08:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/E-comDevblog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="e-comdevblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Zend Framework vs. CodeIgniter</title>
		<link>http://dev.tonic1394.com/2010/09/zend-framework-vs-codeigniter/</link>
		<comments>http://dev.tonic1394.com/2010/09/zend-framework-vs-codeigniter/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 22:06:53 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[stupid]]></category>
		<category><![CDATA[why me]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=504</guid>
		<description><![CDATA[I hope nobody minds but this is going to be more of a rant than an actual performance comparison of the two frameworks. First of all I started using CodeIgniter almost two years ago, and while it was a bit of a thorn at first it was never super difficult to figure out how to [...]]]></description>
			<content:encoded><![CDATA[<p>I hope nobody minds but this is going to be more of a rant than an actual performance comparison of the two frameworks. First of all I started using CodeIgniter almost two years ago, and while it was a bit of a thorn at first it was never super difficult to figure out how to do stuff. The documentation was easy to understand and full of examples of what to do, plus things worked when I did them. As a result I've used CodeIgniter on several projects since.</p>
<p>Recently at my current job the powers that be (hereafter referred to as "they") decided to go from a progressive coding approach to a more MVC type approach using a framework (either custom made or already built). I'd like to point out that I'm all for using a framework especially on the applications we've got right now. I did suggest CodeIgniter as the framework of choice but my suggestion was received with disgust, so I kept my mouth shut...big mistake.</p>
<p>After attempting to build their own MVC Framework "they" decided to go with Zend Server Community Edition. Now I didn't (and still don't, which is sad) know a lot about the Zend Framework so I was somewhat excited to see it in action, especially since my experience with CI has been so great. And I guess maybe that's one of the reasons I'm posting today.</p>
<p>For anyone out there wondering if Zend is a good match for you, STOP!<br />
For anyone out there who recently implemented the Zend Framework, WHY? It's not to late to turn back.</p>
<p>I've been working with the Zend Framework for about two weeks now, and I don't expect to know everything there is to know about Zend but I do expect to know SOMETHING. Let's just take a trip down memory/nightmare lane.</p>
<p>Please excuse me if I can't remember all the details, I've tried so hard to block some of this from ever resurfacing.</p>
<p>My first task was to figure out how to ajax with zend, seems simple enough right? Shoot zend even created a helper that loads the (almost) latest jQuery libraries for you so you never have to worry about being up to date. Not only that but zend has a way to build your Ajax request so you don't have to know how to do that yourself either. What they don't tell you is that in order for the jquery libraries to be loaded on your page, you DO have to use at least one of their custom php jquery building tools (in other words, you can't make all your jquery by yourself), otherwise the libs just wont load. Instead they let you beat your head against your desk for hours and hours until you finally un-comment a test jquery builder you had previously used only to find out that was the missing piece.</p>
<p>Next our whole team has been tasked with creating a new application using zend, it's been over a week now, I still feel like I don't know anything. Now you might be saying to yourself, "did you try google dipstick?" Yup sure did, and as google does it pulled up all kinds of links. Almost always the top 5 go strait to the official zend documentation which is by far the worst documentation I've ever seen about anything. It's like when someone has a secret and they know you want to know, but they know that if they tell you then they'll lose the leverage they have on you, so they just hold on to it with that smirk on their face and never tell you anything. There's all kinds of words but they don't say much and the examples are horrific at best. One example I was looking at had a variable in it, and they'd conveniently cut out the part where they actually initialize that variable so you have no idea what values it is supposed to hold. Turns out it was an array, but I still don't know if it was a named array or if it can simply be numbered. I actually got a little excited when I stumbled onto the Programmers reference guide, I thought "yes if anything will help this is it", I was wrong to think that and I apologize.</p>
<p>Now here's the kicker, I do need to backtrack a bit. When you install zend there is a GUI that is installed to help you manage how the server works, I've recently lost this GUI, by lost I mean I know where it's supposed to be and the files are all there but the GUI doesn't show up when i put the correct URL in my browser. So I started researching this, only to find that a certain part of the server called lighttpd is not running, the GUI is the only thing that requires lighttpd. So i started googling lighttpd is not running and got a fair amount of hits on that one. None of which helped. Finally I decided to create an account with the zend forums and humbly ask the zend folks themselves what to do about my problem.</p>
<p>To my dismay, when I logged in I found a little counter at the bottom of the page that said "Users browsing this forum: disgruntled and 0 guests" (if you haven't guessed, I'm 'disgruntled'). You have got to be kidding me, I'm the only one on this forum? Now to be fair it was after 5:00 on the east coast so I imagine the 3 people using zend in that part of the world have gone home.</p>
<div id="attachment_507" class="wp-caption alignnone" style="width: 262px"><a href="http://dev.tonic1394.com/wp-content/uploads/2010/09/Picture-11.png"><img src="http://dev.tonic1394.com/wp-content/uploads/2010/09/Picture-11.png" alt="how many people on this forum?" title="just me huh?" width="252" height="57" class="size-full wp-image-507" /></a><p class="wp-caption-text">how many people on this forum?</p></div>
<p>Needless to say, I'm a little disappointed, awe who am I kidding? I'm downright furious.</p>
<p>On the flip side, if anyone reading this has any idea on where I can get my hands on some useful examples of zend at work. Please leave them in the comments. </p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/09/zend-framework-vs-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to run OSX from a USB drive</title>
		<link>http://dev.tonic1394.com/2010/08/how-to-run-osx-from-a-usb-drive/</link>
		<comments>http://dev.tonic1394.com/2010/08/how-to-run-osx-from-a-usb-drive/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 04:20:21 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Max]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=492</guid>
		<description><![CDATA[The Problem: If you've read some of my previous posts, or followed my twitter feed, you'll know that my iMac died.  After running as many hardware tests as I knew how to run, I determined that the hard drive was dead.  It then sat on my shelf for a few months and I finally decided [...]]]></description>
			<content:encoded><![CDATA[<h2>The Problem:</h2>
<p>If you've read some of my previous posts, or followed my twitter feed, you'll know that my iMac died.  After running as many hardware tests as I knew how to run, I determined that the hard drive was dead.  It then sat on my shelf for a few months and I finally decided to fix it so I could either use it (to keep the kids off the other computer) or sell it.  I took it to my local mac shop (no Apple store out here), and wouldn't you know it, they claimed that the file system structure was hosed, but that they fixed it.</p>
<p>Unfortunately, they were full of hot air and I was left (again) with an iMac-shaped paper weight.  I ran a few more tests and found that yes, I was right, the drive was toast. So I did what any rational technologist would do, I googled the ever-loving goodness for how to run OSX from an external hard drive.</p>
<p>What I was left with was rather disappointing, a deluge of how to put the installation of  Snow Leopard on USB drives and install from them (yes, I know it's not actually disappointing , it's really a rather cool thing, and a good solution to backing up your installation DVD, but that's not what I needed). So taking a blind stab in the dark, here's the method I came up with.</p>
<p><span id="more-492"></span></p>
<h2>What you'll need:</h2>
<ul>
<li>Your Leopard or Snow Leopard Installation DVD(s) - "Your" implies a legal copy! (I used Leopard because I misplaced my Snow Leopard copy)</li>
<li>A size-able USB drive (minimum 20GB, and no it doesn't matter if it is currently FAT, FAT32, NTFS, HFS+, etc. and seriously, use at least a 60GB drive. I tested successfully with both a 60GB and a 160GB drive)</li>
<li>1-3 hours (I recommend having a kindle/nook/kobo/ipod/kids to cure your boredom while you wait for the install to complete)</li>
<li>Intel-based Mac (I used an iMac (circa late 2007-2008), but any intel mac *should* work)</li>
</ul>
<h2>Lets get it started:</h2>
<p>Plug in your USB drive, insert your installation DVD and turn on your mac. Hold down the 'option' key and wait for the boot loader to appear.  Choose your install dvd to boot from and wait for the OSX installation screen to appear.</p>
<div class="wp-caption aligncenter" style="width: 570px"><img title="OSX Installation Welcome Screen" src="http://dev.tonic1394.com/images/OSX_1.JPG" alt="OSX Installation Welcome Screen" width="560" height="420" /><p class="wp-caption-text">OSX Installation Welcome Screen</p></div>
<p>Select your language and click the next arrow button.</p>
<p>When the pre-installation environment has loaded, click on Utilities -&gt; Disk Utilities</p>
<p><img class="aligncenter" title="Utilities, Disk Utilities" src="http://dev.tonic1394.com/images/OSX_2.JPG" alt="menu of Utilities -&gt; Disk Utilities" width="560" height="420" /></p>
<p>When Disk Utilities opens, click on your USB drive and then on the menu to the right click on the "Partition" button.</p>
<p>Choose "1 Partition" from the drop-down menu, then label your drive (or don't), and make sure you choose "Mac OS Extended (Journaled)".</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 570px"><img title="You'll need to partion your drive correctly" src="http://dev.tonic1394.com/images/OSX_3.JPG" alt="Setting the partion for your drive" width="560" height="420" /><p class="wp-caption-text">Set up your partition, label, and click options (Not Apply yet!)</p></div>
<p>Before you click the "Apply" button, click "Options".</p>
<p>This part is very important, if you pick the wrong type you won't be able to boot from the drive, so make sure you choose "GUID Partition Table".</p>
<div class="wp-caption aligncenter" style="width: 570px"><img title="GUID is your friend (but only if you want to boot from it ;) )" src="http://dev.tonic1394.com/images/OSX_4.JPG" alt="Partition Table Mapping; choose GUID!" width="560" height="420" /><p class="wp-caption-text">GUID == Intel, Apple == Power PC. Hint: This tutorial is for Intel</p></div>
<p>Click "OK", then click "Apply". The partition should not take too long.  When finished, close Disk Utilities and lets start the installation!</p>
<p>If you did everything correctly, after you click the Continue button you should be able to choose your newly partitioned USB drive as the installation target.</p>
<div class="wp-caption aligncenter" style="width: 570px"><img title="Select your USB drive, you are almost done!" src="http://dev.tonic1394.com/images/OSX_5.JPG" alt="My newly partitioned drive as a target installation drive" width="560" height="420" /><p class="wp-caption-text">w00t! Choose the USB drive and let&#39;s get to puttin OSX on it.</p></div>
<p>Click the drive, and click Continue, then sit back and enjoy as OSX is lovingly installed onto your USB drive.</p>
<div class="wp-caption aligncenter" style="width: 570px"><img title="Installation is in full swing!" src="http://dev.tonic1394.com/images/OSX_6.JPG" alt="Installation has started" width="560" height="420" /><p class="wp-caption-text">The time fluctuates a bit, but it&#39;s gonna run at least an hour.</p></div>
<p>When all is said and done you will be gifted with the glorious Welcome to OSX screen/video and you can begin setting-up/registering your mac.</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 570px"><img title="Welcome to OSX, now register or else!" src="http://dev.tonic1394.com/images/OSX_7.JPG" alt="The end of the Welcome Video" width="560" height="420" /><p class="wp-caption-text">There&#39;s my iMac, and on the bottom right you can see my WD 160 External HDD</p></div>
<div class="wp-caption aligncenter" style="width: 570px"><img class=" " title="Registration complete, it's time to enjoy my mac again!" src="http://dev.tonic1394.com/images/OSX_9.JPG" alt="Last screen before Leopard starts" width="560" height="420" /><p class="wp-caption-text">Registration and Network have been set up, all that&#39;s left is to click OK</p></div>
<h2 style="text-align: left;">Final Thoughts:</h2>
<p>Running an entire OS from a USB drive is not ideal, you are going to lose speed, and you are going to lose bandwidth.  Think about it, you are forcing everything through that little Universal Serial Bus.</p>
<p>That being said, I was able to watch <a title="If you don't know what hulu is, I'm pretty sure you live outside the States... in which case I am sorry they have cut you off." href="http://www.hulu.com/" target="_blank">Hulu</a> (it did bug at first, but stabled out), fire up iTunes, use Photobooth, and more importantly I was able to install <a title="I use 2.6 because I'm a freeware type of guy, but they have a newer much cooler version if you care to shell out for it." href="http://www.macupdate.com/info.php/id/14414/mactheripper" target="_blank">Mac the Ripper</a> and rip 3 DVDs to my hard drive, yes I ripped them to the same drive that OSX is running from. Each movie had a running time of about 120 minutes and it ripped them in about 30 minutes per movie.  I could also watch DVDs without skips (in the default DVD player program) and even watch them in <a title="VLC, the only player worth using in any OS (codec free baby!)" href="http://www.videolan.org/" target="_blank">VLC</a> (again without skips).</p>
<p>Oddly enough I could not get <a title="Handbrake, the usual suspect of ripping dvd to mp4" href="http://handbrake.fr/" target="_blank">Handbrake</a> to rip the movies that I had decoded with Mac the Ripper. Which brings me a little off subject for a moment.  I found instead another program called <a title="When Handbrake fails, use this" href="http://www.winxdvd.com/dvd-ripper-for-mac/" target="_self">Winx DVD Ripper for Mac</a>.  Oddly enough while the free version can't rip from disc-to-mp4, it has no problems what-so-ever of ripping from drive-to-mp4 (the free version does not remove copy protection).  It's a little more "windows-y" of a design, but if you can use handbrake you should be able to get around in it.</p>
<p>Alright, well I hope that helps at least a few of you out there, if you have any questions or think I missed something, shout out in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/08/how-to-run-osx-from-a-usb-drive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use PHP to Build an Array of ‘Times of Day’</title>
		<link>http://dev.tonic1394.com/2010/07/use-php-to-build-an-array-of-times/</link>
		<comments>http://dev.tonic1394.com/2010/07/use-php-to-build-an-array-of-times/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 16:57:06 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Array Of Times]]></category>
		<category><![CDATA[Time Of Day]]></category>
		<category><![CDATA[Times Loop]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=478</guid>
		<description><![CDATA[It's been a long time since I posted so I find it ironic that "time" is what brings me here today. Ok that was pretty corny. You'd think this would be something that would be pretty easy to find on the web, I was a little shocked there wasn't some post about it in the [...]]]></description>
			<content:encoded><![CDATA[<p>It's been a long time since I posted so I find it ironic that "time" is what brings me here today. Ok that was pretty corny. You'd think this would be something that would be pretty easy to find on the web, I was a little shocked there wasn't some post about it in the PHP manual but there wasn't so here it is. I was looking for a quick way to build an array of times of day starting with midnight and increasing every half hour until 11:30 PM (or 23:30 for you G.I. Joe's). PHP has an abundance of time functions that are all very useful in their own unique way. After trying various different ones i finally came up with the following.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p478code7'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4787"><td class="code" id="p478code7"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//build array of times.</span>
<span style="color: #000088;">$times</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;00:00:00&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$times</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;00:00:00&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;g:i a&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">48</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;+ 30 minutes&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H:i:s&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$times</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;g:i a&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>To break it down, I set $time to start at Midnight or 00 Hours and then set my first $times array member to the lamens "12:00 am" using the date() function. Since there are 24 hours in a day I know there are 48 half hours in a day so I set my loop to run 48 times.</p>
<p>Lets break down the loop:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p478code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4788"><td class="code" id="p478code8"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;+ 30 minutes&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will add 30 minutes to the $time variable each time the loop runs.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p478code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4789"><td class="code" id="p478code9"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H:i:s&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This sets $key to the military notation of the current $time (the why will become more obvious later).</p>
<p>Finally I set my next $times array member with:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p478code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p47810"><td class="code" id="p478code10"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$times</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;g:i a&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Again the value of this member is set to the ordinary am/pm notation.</p>
<p>If you were to look at an array member in plain text it would look something like this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p478code11'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p47811"><td class="code" id="p478code11"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$times</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;19:00:00&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;7:00 pm&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Pretty simple, now just to display it. For my purposes I chose a select box.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p478code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p47812"><td class="code" id="p478code12"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>select <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;required&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;CloseTime&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">&gt;--</span>Select<span style="color: #339933;">--&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$times</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;?php echo $key; ?&gt;'</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$CloseTime</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$CloseTime</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; selected='selected'&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Since I set up my $key as military notation I am  able to use $key as the value of the &lt;option&gt;. I did this so I can easily put that value in the DB as a TIME and not have to worry about stripping the " am" and " pm". Alternatively since $value was set up with am/pm notation it displays nicely to the user as 7:00 PM rather than 19:00 thus allowing regular Joe to keep his fingers in his nose rather than use them to figure out what time that is.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/07/use-php-to-build-an-array-of-times/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhoneGap – The missing android/windows setup guide</title>
		<link>http://dev.tonic1394.com/2010/06/phonegap-the-missing-androidwindows-setup-guide/</link>
		<comments>http://dev.tonic1394.com/2010/06/phonegap-the-missing-androidwindows-setup-guide/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 16:22:37 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=466</guid>
		<description><![CDATA[The Introduction Yesterday I spent a good part of the day setting up the absolutely fantastic framework PhoneGap.  If you don't know what PhoneGap is, and you are a web developer, you are truly missing out. The only thing I can compare it to (from a high level) is Adobe Air.  Air lets you build [...]]]></description>
			<content:encoded><![CDATA[<h2>The Introduction</h2>
<p>Yesterday I spent a good part of the day setting up the absolutely fantastic framework PhoneGap.  If you don't know what PhoneGap is, and you are a web developer, you are truly missing out. The only thing I can compare it to (from a high level) is Adobe Air.  Air lets you build a page out of html, css, and js and then renders it in a webkit self-contained browser that you can then package up and distribute on any platform that runs air (Win/Mac/Linux), and yes you can also build Air apps with Flex and Flash.  PhoneGap is similar to Air as it too uses html, css, and js to build apps for Android, iOS, WebOS, Blackberry, Symbian, and Nokia.</p>
<p>Now don't let my title fool you, there is a guide (and a pretty good one at that) waiting <a title="The official PhoneGap Android tutorial" href="http://phonegap.pbworks.com/Getting-started-with-Android-PhoneGap-in-Eclipse" target="_blank">for you in the PhoneGap Wiki</a>, the problem is that it is now out of date and will cause you grief if you try to follow a few of the steps because they look like they are the right steps to follow.  That's why I've created this entry to walk you through the mistakes I blundered through to get it set up and working on my Windows 7 box (My mac died, and my linux lappy is a netbook - not ideal for developing on... plausible, but not ideal).<br />
<span id="more-466"></span></p>
<h2>The Installation</h2>
<p>If you point your browser toward <a title="PhoneGap - Move your webskills to your mobile" href="http://www.phonegap.com/" target="_blank">phonegap.com</a> you can grab the latest version of PhoneGap that is ready for the taking (note that the big download button in the top right will give you the master package, that is to say that you'll get compiled versions of phone-gap for all devices.  If you GIT in, you can pick up just the resources for the device you want to develop for).  Also you should notice a large 'Get Started' button (click that open in a new tab).</p>
<p>Starting on the 'Get Started' page, go ahead and click on the 'Android (Eclipse)' link. This will drop you in the wiki for setting up Android development with PhoneGap. Please note that I am writing this for version 0.9.1, so by the time you find and read this, my guide may be well out of date.  Lets follow the listed steps (with my commentary)</p>
<p>- Install<a title="Choose your Download wisely, JDK or JRE (hint: JRE is the WRONG ONE)" href="http://java.sun.com/javase/downloads/index.jsp" target="_blank"> JDK 1.6</a> - Yep, totally accurate and awesome, do NOT download the JRE, make sure you get the <a title="This is the link for the JDK, not the JRE" href="http://java.sun.com/javase/downloads/widget/jdk6.jsp" target="_blank">JDK</a> (you may also need to set up a JAVA_HOME system or user variable).</p>
<p>- Install Eclipse - This one is wicked straight forward. Just about any 'brand' of eclipse will do, if you can hit the update site to install ADT, you can use that version of eclipse.  For the fun of it I even managed to install ADT into IBM Rational Application Developer, but you may want to stick with the <a title="Yay for Eclipse, saving java developers from paying for an IDE and not having to be forced to run on netbeans." href="http://www.eclipse.org/downloads/" target="_blank">vanilla Galileo version of eclipse</a>.</p>
<p>- Install the Android SDK - Another fairly straight forward piece.  Download the SDK, unpack it (to root), then open it and update any of the pieces you need (in my case, everything). Once you are finished, make sure you've added the <a title="Directions from Google for proper SDK installation" href=" http://developer.android.com/sdk/installing.html" target="_blank">SDK to your PATH</a>, and crack open your freshly installed eclipse and <a title="Eclipse, ADT. ADT, Eclipse. Now go ahead and get familiar." href="http://developer.android.com/sdk/eclipse-adt.html" target="_blank">install the ADT</a>.</p>
<p>- Install Apache ANT - Go and grab the latest binary of <a title="I grabbed version 1.8.1, but who knows what version will be offered when you click on this link." href="http://ant.apache.org/bindownload.cgi" target="_blank">Apache Ant</a>. After grabbing the zip, uncompress it somewhere (root sounds good), and add that path (I used the bin folder instead of the unpacked root) to your system PATH.</p>
<p>- Install Ruby - This step was my first hang-up.  Since I am not a Ruby programmer, and where I work refers to Ruby as the devil, I have had no previous interaction with Ruby.  So do NOT follow the original Ruby download link, instead head over to the <a title="Ruby Installer, - The way to install Ruby on Windows" href="http://rubyinstaller.org/" target="_blank">RubyInstaller</a>. This will install Ruby into your system without having to grab extra dependencies and monkey with your path (it contains a code monkey that does that for you <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). After you have installed Ruby, you are ready to attempt to install nokogiri.  Since I had never used Ruby and only knew of it as a mystical scripting language that does... uh... well... you can build things with it.  I had no idea what the line "install nokogiri via - gem install nokogiri' meant.  So I cracked open my command line and typed 'install nokogiri via - gem install nokogiri', and of course nothing happened. What you really need to type is just:</p>
<pre>gem install nokogiri</pre>
<p>then wait 5-10 minutes as nokogiri is downloaded and installed (there I just saved you an hour of changing your PATH, cracking open .bat files and trying to ascertain what they are doing, and surfing Google to figure out why there doesn't seem to be an 'install' or 'via' command in ruby).</p>
<p>-Install Git - There are plenty of ways to install git, you can use Cygwin (blech), or you can grab the nice <a title="msysgit, making git accessable to windows users without the bloat and system wear of cygwin." href="http://code.google.com/p/msysgit/" target="_blank">msysgit</a> program. Keep in mind that msysgit is in preview, so don't expect a fully-functioning, never-crashing, awesome piece of awesomnicity. But it does work, and I'm a fan of it. After you get msysgit installed, remember to <a title="Generate the SSH keypairs for SPARTA!" href="http://help.github.com/msysgit-key-setup" target="_blank">generate an SSH keypair</a>! When following the SSH keypair link, <strong>don't attempt it in command prompt, crack open 'Git Bash' from your start menu</strong>.</p>
<p>- Whew! Almost there! all that's left is to make sure you installed ADT and the Android SDK correctly, so follow the hello world from either a book, online tutorial, or the <a title="Hello!" href="http://developer.android.com/guide/tutorials/hello-world.html" target="_blank">official hello world</a> from Google.</p>
<p>- Ok, here's the second hang up, and quite the massive hang up it is.  The directions here say that you need to either roll with step 10a, or 10b.  10b says that it is the 'old way' and is what comes bundled in the "read me" for PhoneGap 0.9.1.  10a is an exercise in futility that will get you giving up and playing "The Force Unleashed" for 2 hours while you cool down by throwing storm troopers against the wall and stabbing the ones that lived with your light-saber. So just to be clear... <strong>SKIP 10A</strong>!</p>
<p>Lets do this instead, get your resources put into a folder, say "C:\www ". Make sure you include your icon.png file (if you don't have one, borrow the one bundled with PhoneGap - phonegap/framework/res/drawable/icon.png).  For testing purposes, I copied the files from my phonegap/example folder to C:\www  (index.html, master.css, and phonegap.js). Now lets follow the readme and run:</p>
<pre>ruby ./droidgap \\android-sdk-windows TestGap TestGap.com C:\\www C:\\phonegap\projects\TestGap</pre>
<ul>
<li>Note that the double back-slashes were used because I'm running Windows 7 on my development box, if you are running a different version of windows, using the double backslashes will probably mess you up.</li>
</ul>
<ul>
<li>If you received a '.' is not recognized as an internal or external command, operable program or batch file. Then you left off "ruby" before "./droidgap".  droidgap is a ruby script, and as such must be called from ruby, if you had ruby on and still got that error, then you don't have ruby in your system PATH, add it and try again.  If you received any other error, you will need to correct what is broken (missing xml config, bad files, etc).</li>
</ul>
<ul>
<li>Another thing to keep in mind, there are a few places (including the wiki) that will tell you that your local.properties file is hosed, and you'll probably be confused because you DON'T HAVE ONE.  Don't worry about it, that is a generated file, it doesn't come pre-packaged, so don't think your download is bad when you unpack the zip and it's not there. When you run the droidgap script it will create one for you (populated off of the values entered when calling that script).</li>
</ul>
<p>- Lets open your generated project! - Open Eclipse and File -&gt; New -&gt; Project. Then choose Android -&gt; Android Project. Give your project a name, click the radio button for "Create project from existing source", and browse to your generated project folder (if you followed what I typed that would be in C:\phonegap\projects\TestGap).  Next choose the API level (for information reguarding API levels, <a title="&quot;One of these levels is not like the other..&quot;" href="http://developer.android.com/guide/appendix/api-levels.html" target="_blank">please consult the Android docs</a>), and click  OK.</p>
<ul>
<li>Note that unless you modified your AndroidManifest.xml file, the default is '2'. My projects (once created inEclipse) threw build errors until I had changed this to a higher level (I don't remember if it was when I switched to 1.6, or 2.1, but I was playing with those two builds). Also remember that if you change the AndroidManifest.xml file, that you'll need to right-click on your project and change the build target to match (well, you don't have too, but you'll get warnings and something that looks like an error but isn't, so I'd say you *should* change the project build target to match).</li>
<li>Don't forget to add the phonegap.jar to your project. Expand the libs folder and then right-click on phonegap.jar and choose "BuildPath -&gt; Add to Build Path", if you do forget, you'll get project errors and be unable to fix them.</li>
</ul>
<p>Once you have the project imported/created and you are error-free, launch the app (either through the Android Emulator, or through your android phone/debugging hardware (I'm not providing the steps to setting that up, but if you have debugging hardware, you probably already know how to use it <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). I tested both, and while the emulator did load it, since it was an emulator, it didn't really work (hard to test an accelerometer from an emulator).  Testing on my HTC Hero though was pure beauty; geo-location worked, the beep button played my notification sound, and the accelerometer was returning good data, it was awesome!</p>
<p>Hopefully this will give you a good head-start into developing with PhoneGap in Windows for Android.  PhoneGap is awesome and I hope that it continues to grow, get better, and get used.  If you find it helpful, drop them a line, I know personally that they are very fast to contact and good to work with if you run into a problem.</p>
<p>Let me know if this entry needs any fixes, or images/screen captures to help you out with.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/06/phonegap-the-missing-androidwindows-setup-guide/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Quick and Painless file conversion</title>
		<link>http://dev.tonic1394.com/2010/06/quick-and-painless-file-conversion/</link>
		<comments>http://dev.tonic1394.com/2010/06/quick-and-painless-file-conversion/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 19:32:41 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Off-Topic]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[file conversion]]></category>
		<category><![CDATA[web tools]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=462</guid>
		<description><![CDATA[It's pretty rare that a person needs to convert one file type to another (especially since programs like OpenOffice.org will open just about anything). However today I got a file with a .wps extension, my first thought was 'maybe that's a word perfect' so I tried to open in w/ OpenOffice writer which gave it [...]]]></description>
			<content:encoded><![CDATA[<p>It's pretty rare that a person needs to convert one file type to another (especially since programs like OpenOffice.org will open just about anything). However today I got a file with a .wps extension, my first thought was 'maybe that's a word perfect' so I tried to open in w/ OpenOffice writer which gave it it's best shot only to come up way short by opening a blank page.<br />
I promptly went to google to find out what extension that is and not only did I find it's an old Microsoft Works file that is no longer used/supported, but I also found a handy website for converting such files (among others) to more user friendly formats.<br />
The site is called <a href="http://www.zamzar.com/">zamzar.com</a>, all you do is point your browser there (or click on the link) upload a file and within a few minutes you have an email with a download link to your new file, it's easy, fast and best of all free. You don't even have to create an account, although there is that option. I was so impressed with it I decided to post it here on my favorite tech blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/06/quick-and-painless-file-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check Scroll Bar Position</title>
		<link>http://dev.tonic1394.com/2010/06/check-scroll-bar-position/</link>
		<comments>http://dev.tonic1394.com/2010/06/check-scroll-bar-position/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 15:41:19 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascipt]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[scroll-bar]]></category>
		<category><![CDATA[scrollbar]]></category>
		<category><![CDATA[scrollTop]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=450</guid>
		<description><![CDATA[I few weeks ago I was tasked with making one of those annoying "you must read the entire page before you continue" things (which as you know really just means you only need to scroll to the bottom of the page before continuing). It was something that I thought would be pretty easy to find [...]]]></description>
			<content:encoded><![CDATA[<p>I few weeks ago I was tasked with making one of those annoying "you must read the entire page before you continue" things (which as you know really just means you only need to scroll to the bottom of the page before continuing). It was something that I thought would be pretty easy to find on the web considering how often I run into it in use. However I was wrong, so here is what I was able to come up with.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p450code18'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45018"><td class="code" id="p450code18"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#selector&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">scroll</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: #003366; font-weight: bold;">var</span> elem <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> position <span style="color: #339933;">=</span> elem<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">scrollHeight</span> <span style="color: #339933;">-</span> elem.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>position <span style="color: #339933;">==</span> $<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">outerHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;disable&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">else</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;disable&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;disable&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>A few things to note:<br />
the "elem[0]" that defines "var position" is significant for some reason, I tried it without the "[0]" and it broke, I'm not 100% sure why so if anyone wants to weigh in, that would be great. Secondly, it is good to keep in mind that the "disable" attr is not supported on IE7 and lower so in order to <del datetime="2010-06-01T15:13:27+00:00">fix</del> band-aid this I simply made the button look disabled by doing something like.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p450code19'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45019"><td class="code" id="p450code19"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>position <span style="color: #339933;">==</span> $<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">outerHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
     $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cursor&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;pointer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">else</span>
     $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cursor&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Ultimately this only fakes people out if they pay attention to their cursor, which is probably less than 50% of the time. so really the best way to do this i found is as follows:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p450code20'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45020"><td class="code" id="p450code20"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#selector&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">scroll</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: #003366; font-weight: bold;">var</span> elem <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>checkScrollTop<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cursor&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;pointer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">else</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cursor&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Then I Have a function called checkScrollTop() which takes an argument.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p450code21'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45021"><td class="code" id="p450code21"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> checkScrollTop<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> position <span style="color: #339933;">=</span> elem<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">scrollHeight</span> <span style="color: #339933;">-</span> elem.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>position <span style="color: #339933;">==</span> $<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">outerHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</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></pre></td></tr></table></div>

<p>And last but definatley not least, a click event on the button so we can catch those trying to cheat w/ IE7 and (gulp) below.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p450code22'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45022"><td class="code" id="p450code22"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:button:contains('submit')&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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: #003366; font-weight: bold;">var</span> elem <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#selector&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>checkScrollTop<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#step1_disable'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">else</span>
      <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Please read the entire policy before clicking <span style="color: #000099; font-weight: bold;">\&quot;</span>submit<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>to break it down, the $("#selector").scroll function simply decorates the button, while the click event on the button determines if the user can continue, if not it pops an alert up telling them what they must do. both events use the checkScrollTop(elem) function which measures the position of the scroll-bar.<br />
Happy Annoying people <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/06/check-scroll-bar-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site changes</title>
		<link>http://dev.tonic1394.com/2010/05/site-changes/</link>
		<comments>http://dev.tonic1394.com/2010/05/site-changes/#comments</comments>
		<pubDate>Mon, 10 May 2010 13:12:04 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=447</guid>
		<description><![CDATA[A quick note, I've been playing with themes lately (I keep telling myself that I'm going to actually code one, but it never happens) so keep that in mind if the site keeps changing on you. I'm just trying to find a style that is pleasing to the eye, and works well for most visitors.]]></description>
			<content:encoded><![CDATA[<p>A quick note, I've been playing with themes lately (I keep telling myself that I'm going to actually code one, but it never happens) so keep that in mind if the site keeps changing on you.  I'm just trying to find a style that is pleasing to the eye, and works well for most visitors.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/05/site-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LinkPost – Jan through April 2010</title>
		<link>http://dev.tonic1394.com/2010/05/linkpost-jan-through-april-2010/</link>
		<comments>http://dev.tonic1394.com/2010/05/linkpost-jan-through-april-2010/#comments</comments>
		<pubDate>Mon, 10 May 2010 12:42:59 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[LinkPost]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=443</guid>
		<description><![CDATA[It's that time again. The time when I make good on those promises of finally posting all the backed up LinkPosts . The first quarter of this year has been fairly amazing, Google has started to include speed in page-ranking, jQuery released 1.4, and css3 is starting to build some serious momentum. There are links [...]]]></description>
			<content:encoded><![CDATA[<p>It's that time again.  The time when I make good on those promises of finally posting all the backed up LinkPosts <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . The first quarter of this year has been fairly amazing, Google has started to include speed in page-ranking, jQuery released 1.4, and css3 is starting to build some serious momentum.  There are links to all of that and more in this massive LinkPost</p>
<p><span id="more-443"></span></p>
<h2>-=HTML JS PHP ETC =-</h2>
<p><a title="Go forth and spread the power of the ajaxery" href="http://www.noupe.com/ajax/30-fresh-ajax-tutorials-and-techniques.html" target="_blank">http://www.noupe.com/ajax/30-fresh-ajax-tutorials-and-techniques.html</a> - More Ajax tutorials (in case you forgot <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p><a title="Blackhat is bad, Speed is good." href="http://www.webconfs.com/15-minute-seo.php" target="_blank"> http://www.webconfs.com/15-minute-seo.php</a> - seo checklist, shows some ranking weight numbers (looks like for google and bing mostly).</p>
<p><a title="Pre-Loading, making transitions smoother since 19what-huh" href="http://perishablepress.com/press/2009/12/28/3-ways-preload-images-css-javascript-ajax/" target="_blank"> http://perishablepress.com/press/2009/12/28/3-ways-preload-images-css-javascript-ajax/</a> - Image preloading using css, javascript, or javascript (heh heh, I mean ajax)</p>
<p><a title="Like Freemium, only without that nagging feeling that someone is watching you..." href="http://www.dzinepress.com/2010/01/25-high-quality-premium-as-free-wordpress-themes/" target="_blank"> http://www.dzinepress.com/2010/01/25-high-quality-premium-as-free-wordpress-themes/</a> - WordPress themes for everyone! quick don't make your own, use these!</p>
<p><a title="What does your chrome taste like? mine has trace elements of the web developer toolbar in it." href="http://designreviver.com/general/the-best-google-chrome-extensions/" target="_blank"> http://designreviver.com/general/the-best-google-chrome-extensions/</a> - mmmmm... Chrome links... I've been using chrome a lot more these days.</p>
<p><a title="Freaking IE, quit breaking the internet!" href="http://www.modernizr.com/" target="_blank"> http://www.modernizr.com/</a> - Get your HTML5 and CSS3 on now dang it! Seriously though, pretty cool lib, it doesn't add HTML5 or CSS3 to your browser, but lets you control the fail-over features.</p>
<p><a title="The .htaccess file is the one ring of my apache server" href="http://devmoose.com/coding/20-htaccess-hacks-every-web-developer-should-know-about" target="_blank"> http://devmoose.com/coding/20-htaccess-hacks-every-web-developer-should-know-about</a> - love that htaccess file.</p>
<p><a title="html5 video.... mmmmm... " href="http://jilion.com/sublime/video" target="_blank"> http://jilion.com/sublime/video</a> - This was featured on ajaxian, but here is a nice html5 video player (that means webkit (and it's variants) for now).  Looks pretty sweet</p>
<p><a title="More ajax for the masses" href="http://designreviver.com/tips/5-practical-ways-using-ajax/" target="_blank"> http://designreviver.com/tips/5-practical-ways-using-ajax/</a> - good list of resources that point out 5 great ways to incorporate a little ajaxery into your site.</p>
<p><a title="Yep, I love the jQ, but CSS3 is amazing.  Good stuff for sure." href="http://blog.optimum7.com/anthony/website-design/pure-css3-animated-at-at-walker-from-star-wars-2.html" target="_blank"> http://blog.optimum7.com/anthony/website-design/pure-css3-animated-at-at-walker-from-star-wars-2.html</a> - Grab a webkit browser and click the link, it's time for some CSS3 animation, AT-AT style (funny that you could use jQuery to do this for the last couple of years, but nice to see CSS3 starting to make serious dents in flash and animation).</p>
<p><a title="This is a great tool, but it's LAGTASTIC. But for the ogg newbie, this is a very valuable tool." href="http://firefogg.org/" target="_blank"> http://firefogg.org/</a> - Great plugin that lets you easily encode ogg theroa video files.</p>
<p><a title="Awesome Tutorial, I may have to aquire that book..." href="http://diveintohtml5.org/video.html" target="_blank"> http://diveintohtml5.org/video.html</a> - Encoding guide for HTML5 video. It's an excerpt from a book, good reading though, shows fall-back support for IE with flowplayer.</p>
<p><a title="Ever notice that I had a thing with html5 video for a few weeks? Yeah, I didn't notice that either." href="http://camendesign.com/code/video_for_everybody" target="_blank"> http://camendesign.com/code/video_for_everybody</a> - another take on html5 video, this time without javascript (although it does use conditional tagging... and plenty of it)</p>
<p><a title="Wik Wikk Wikki Wik Wik Wikki - sound check" href="http://www.filamentgroup.com/lab/introducing_enhancejs_smarter_safer_apply_progressive_enhancement/" target="_blank"> http://www.filamentgroup.com/lab/introducing_enhancejs_smarter_safer_apply_progressive_enhancement/</a> - a javascript framework that tests a browsers ability to handle new javascript and css features. Definetly not a bad idea.</p>
<p><a title="Form good! Reading Bad!" href="http://www.lukew.com/ff/entry.asp?1007" target="_blank"> http://www.lukew.com/ff/entry.asp?1007</a> - It's all about conversion <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Change up your forms to increase your site conversion rates... Good read.</p>
<p><a title="Light it up, set the code on fire. PHP tastes good bbq'd" href="http://devsnippets.com/article/getting-started-with-codeigniter-and-how-to-create-all-those-great-apps.html" target="_blank"> http://devsnippets.com/article/getting-started-with-codeigniter-and-how-to-create-all-those-great-apps.html</a> - fantastic tutorial on getting started with CodeIgniter.</p>
<p><a title="Get your programming logic on." href="http://www.klauskomenda.com/code/javascript-programming-patterns/" target="_blank"> http://www.klauskomenda.com/code/javascript-programming-patterns/</a> - a nice read on different programming patterns in javascript (singleton in js? yeah, this covers that).</p>
<p><a title="css3, is there anything you can't do?" href="http://nicolasgallagher.com/progressive-enhancement-pure-css-speech-bubbles/" target="_blank"> http://nicolasgallagher.com/progressive-enhancement-pure-css-speech-bubbles/</a> - CSS3 is hot, seriously, it makes everything just so nice.</p>
<p><a title="Get your analytics on without one of the big brothers watching" href="http://slimstat.net/" target="_blank"> http://slimstat.net/</a> - free live stats for your site (php &amp; mysql)</p>
<p><a title="Dev Tools fro IE :O wonders never cease" href="http://samuli.hakoniemi.net/debugging-and-testing-in-internet-explorer-made-easy/" target="_blank"> http://samuli.hakoniemi.net/debugging-and-testing-in-internet-explorer-made-easy/</a> - great article on tools to use for IE development, and I was using most of them (which is sad because they really don't stack up very well compared to say Firebug and the webkit inspector (Chrome and Safari), but it's a great set of tools if you don't have any at all <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a title="Sure this is old news now, but it was ground-breaking the day the news dropped" href="http://chrispederick.com/blog/web-developer-0-1-for-google-chrome/" target="_blank"> http://chrispederick.com/blog/web-developer-0-1-for-google-chrome/</a> - Chrome gets the Web Developer Tool Bar! yay! way to go Developer-Man!</p>
<p><a title="Rate this post, just kidding I haven't implemented that kind of system, drop a comment if you reall want to rate this ;)" href="http://speckyboy.com/2010/04/21/15-javascript-and-plugins-and-tutorials-for-adding-ratings/" target="_blank"> http://speckyboy.com/2010/04/21/15-javascript-and-plugins-and-tutorials-for-adding-ratings/</a> - just like the link says, 15 links for plugins and tutorials on how to add a ratings system to your site.</p>
<p><a title="Like Growl, only native inside the browser." href="http://ajaxian.com/archives/desktop-notifications-with-webkit" target="_blank"> http://ajaxian.com/archives/desktop-notifications-with-webkit</a> - Webkit is winning over a little more each day...</p>
<p><a title="Render this! (small arms explosion)" href="http://www.noupe.com/tools/the-importance-of-cross-browser-compatibity-tips-and-resources.html" target="_blank"> http://www.noupe.com/tools/the-importance-of-cross-browser-compatibity-tips-and-resources.html</a> - Good round up of toolsl to make sure your site renders correctly in different browsers</p>
<h2>-= jQuery =-</h2>
<p><a title="Call down the rain from multiple=">http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/</a> - cross domain issues be gone! thanks to an almost-exploit with yahoo <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a title="jQ 1.4 dropped, and here's your catch up class" href="http://net.tutsplus.com/tutorials/javascript-ajax/jquery-1-4-released-the-15-new-features-you-must-know/" target="_blank"> http://net.tutsplus.com/tutorials/javascript-ajax/jquery-1-4-released-the-15-new-features-you-must-know/</a> - Nettuts brings you the quick and dirty updates to what jQ 1.4 can do.</p>
<p><a title="Seriously, your feelings will get hurt." href="http://james.padolsey.com/javascript/jquery-lint/" target="_blank"> http://james.padolsey.com/javascript/jquery-lint/</a> - If you've used lint before, you know what this is, if you haven't, prepare to get your feelings hurt.</p>
<p><a title="Widgets, Widgets, and more Widgets! Widgets for everyone!" href="http://speckyboy.com/2010/01/20/25-tutorials-and-resources-for-learning-jquery-ui/" target="_blank"> http://speckyboy.com/2010/01/20/25-tutorials-and-resources-for-learning-jquery-ui/</a> - I haven't used jQuery UI since it's first version, but if I ever wanted to, here's where I'd start learning to use it.</p>
<p><a title="When Nyro gets old, and that other one you use gets too stale, drop this on it." href="http://colorpowered.com/colorbox/" target="_blank"> http://colorpowered.com/colorbox/</a> - lightbox with many good features (pre-loading, ajax, iframe, etc)</p>
<p><a title="Unit test baby!" href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/" target="_blank"> http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/</a> - Unit testing js has never been so fun <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (well if you can call unit testing fun)</p>
<p><a title="The Hotness of Form Validation" href="http://demos.usejquery.com/ketchup-plugin/" target="_blank"> http://demos.usejquery.com/ketchup-plugin/</a> - nice form validation, simple, easy to customize, nice plug in.</p>
<p><a title="Your form doesn't have to look like that, make it uniform" href="http://pixelmatrixdesign.com/uniform/" target="_blank"> http://pixelmatrixdesign.com/uniform/</a> - Lets you customize all form elements, and makes them look the same cross-browser</p>
<p><a title="Smooth, almost Barry White smooth" href="http://razorjack.net/quicksand/" target="_blank"> http://razorjack.net/quicksand/</a> - Effect transition library for jQuery.</p>
<p><a title="Get your pre-load on, whatever you want, seriously" href="http://code.google.com/p/jloader/" target="_blank"> http://code.google.com/p/jloader/</a> - This is a content pre-loader plugin for jQuery, rather than just pre-load images, it can work with a div, or the entire page.</p>
<p><a title="You don't need to live and die anymore, just delegate it out" href="http://www.learningjquery.com/2010/03/using-delegate-and-undelegate-in-jquery-1-4-2" target="_blank"> http://www.learningjquery.com/2010/03/using-delegate-and-undelegate-in-jquery-1-4-2</a> - live and die are used slightly differently with the new delegate and undelegate commands</p>
<p><a title="So you used ajax, and wait what just happened?" href="http://www.learningjquery.com/2010/03/detecting-ajax-events-on-the-server" target="_blank">http://www.learningjquery.com/2010/03/detecting-ajax-events-on-the-server</a> - a nice read on handing the returns or xhr's</p>
<p><a title="If it's not in my list, and it's not in this link, it doesn't belong on the site." href="http://www.smashingmagazine.com/2010/03/12/45-fresh-useful-javascript-and-jquery-techniques-and-tools/" target="_blank"> http://www.smashingmagazine.com/2010/03/12/45-fresh-useful-javascript-and-jquery-techniques-and-tools/</a> - The smashing list of jQ hotness for the last month.</p>
<p><a title="Chart that data man, chart it" href="http://www.1stwebdesigner.com/resources/top-jquery-chart-libraries-interactive-charts/" target="_blank"> http://www.1stwebdesigner.com/resources/top-jquery-chart-libraries-interactive-charts/</a> - 5 jQuery charting libs for your charting goodness, I've used at least two of them.</p>
<p><a title="Image sliders have never looked so good" href="http://nivo.dev7studios.com/" target="_blank"> http://nivo.dev7studios.com/</a> - Easy awesome (with 9 transition effects) image slider powered by the one and only jQuery.</p>
<p><a title="more jQ, MORE!" href="http://www.noupe.com/javascript/35-fresh-javascript-jquery-tools-and-resources.html" target="_blank"> http://www.noupe.com/javascript/35-fresh-javascript-jquery-tools-and-resources.html</a> - Round up of jQ goodies from Noupe.</p>
<p><a title="Yay! hide, I mean utilize things in the browser" href="http://www.jstorage.info/" target="_blank"> http://www.jstorage.info/</a> - While not limited to jQuery (also works for prototype and moo), this is a good tool to enable html5 local storage, or if not available will default to the userData variable.</p>
<p><a title="Burn out those netbook cpu's!" href="http://aext.net/2010/04/jquery-shadow-motion-effect/" target="_blank"> http://aext.net/2010/04/jquery-shadow-motion-effect/</a> - interesting idea using the standard animation package with jQ. The author is also hinting at releasing a plugin in the future.</p>
<p><a title="interesting concept, now how can I use it to rule the world?" href="http://css-tricks.com/resolution-specific-stylesheets/" target="_blank"> http://css-tricks.com/resolution-specific-stylesheets/</a> - Good post on using a little jQ to change your style-sheet based on window size. And yes you could go fluid, but this is for MORE features, not the same thing in a smaller/bigger space</p>
<p><a title="Faster! Rapido!" href="http://www.codenothing.com/archives/2010/8-jquery-micro-optimization-tips/" target="_blank"> http://www.codenothing.com/archives/2010/8-jquery-micro-optimization-tips/</a> - some great tips to speed up your jQ.</p>
<h2>-= Tools &amp; Misc=-</h2>
<p><a title="Get them colors!" href="http://harthur.wordpress.com/2009/12/18/getting-the-color-scheme-of-a-website-using-canvas-and-hierarchical-clustering/" target="_blank">http://harthur.wordpress.com/2009/12/18/getting-the-color-scheme-of-a-website-using-canvas-and-hierarchical-clustering/</a> - Firefox pluginery for color palatte grabbiness.</p>
<p><a title="This reminds me of this conversation I didn't have once where everyone sat in a circle and..." href="http://winebottler.kronenberg.org/" target="_blank"> http://winebottler.kronenberg.org/</a> - Get yer winders apps running on your macapple.</p>
<p><a title="Sharing the media you want with the people you care about." href="http://getmediacore.com/" target="_blank"> http://getmediacore.com/</a> - jinzora may have met its match.</p>
<p><a title="Yep, like it says" href="https://chrome.google.com/extensions/detail/idhfcdbheobinplaamokffboaccidbal" target="_blank"> https://chrome.google.com/extensions/detail/idhfcdbheobinplaamokffboaccidbal</a> - Resolution Test, if you're using chrome to develop, here's your window resize tool</p>
<p><a title="A short term solution that was great till the web developer toolbar guy showed up on scene" href="https://chrome.google.com/extensions/detail/gbkffbkamcejhkcaocmkdeiiccpmjfdi" target="_blank"> https://chrome.google.com/extensions/detail/gbkffbkamcejhkcaocmkdeiiccpmjfdi</a> - Pendule is a Chrome extension that allows you to do various tasks that the Developer Toolbar in Firefox lets you do.</p>
<p><a title="dom dom dom, here comes speedtracer..." href="http://code.google.com/webtoolkit/speedtracer/" target="_blank"> http://code.google.com/webtoolkit/speedtracer/</a> - This is a Google developed tool for Chrome that helps you speed up your site (js, css, layout, dom execution, dom handling, ajax, etc). For windows and linux, you just start chrome with an option, mac users get to install a little somethin' somethin'.</p>
<p><a title="I likes the music" href="http://www.drumbot.com/" target="_blank"> http://www.drumbot.com/</a> - Tools for musicians <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a title="Good'ol lifehacker, bringing tech to the clueless, and bringing clues to the techs." href="http://lifehacker.com/5484934/run-your-own-free-proxy-through-the-google-app-engine" target="_blank"> http://lifehacker.com/5484934/run-your-own-free-proxy-through-the-google-app-engine</a> - free proxy is good...</p>
<p><a title="It does require some installation, but free is good." href="http://dimdim.com/" target="_blank"> http://dimdim.com/</a> - Wicked easy, and free screen-sharing/meeting from your browser.  Works pretty well too.</p>
<p><a title="Video Conferencing made possible through ubuntu" href="http://bigbluebutton.org/" target="_blank"> http://bigbluebutton.org/</a> - if you happen to have an ubuntu server just sitting about you can use this to set up your own video conference sessions (or meetings with desktop sharing, file sharing etc.)</p>
<p><a title="and two months later, I'm still not sure how to use this thing" href="http://matthiasschuetz.com/pixelzoomer/" target="_blank"> http://matthiasschuetz.com/pixelzoomer/</a> - cool plug in for Firefox to help you steal, I mean acquire those hard to find colors and measure space for accurate rerepresentation.</p>
<p><a title="Emu... here Emu... RUN!!!!" href="http://speckyboy.com/2010/04/12/mobile-web-and-app-development-testing-and-emulation-tools/" target="_blank"> http://speckyboy.com/2010/04/12/mobile-web-and-app-development-testing-and-emulation-tools/</a> - great list of emulators for mobile development</p>
<p><a title="Front ends help people who aren't great with type-and-guess" href="http://lifehacker.com/5515093/qsynergy-makes-multi+system-control-easier-and-prettier" target="_blank"> http://lifehacker.com/5515093/qsynergy-makes-multi+system-control-easier-and-prettier</a> - I used to use Synergy all the time, it's great to hear that someone has given the interface a good look and control.</p>
<p><a title="By now there's probably 3 jQuery ports of this, and one CSS3 class project." href="http://mariocrossover.com/" target="_blank"> http://mariocrossover.com/</a> - wow... best flashy app ever... EVER I SAY!</p>
<p><a title="The problem with these Adobe video frameworks is that they are usually huge, and don't make a ton of sense to the average coder, but hey good to see some free stuff from adobe" href="http://www.webresourcesdepot.com/open-source-media-framework-from-adobe/" target="_blank"> http://www.webresourcesdepot.com/open-source-media-framework-from-adobe/</a> - Adobe, open-source media goodness.  Sure I haven't checked it out yet, but I will.... soon</p>
<h2>-= Images &amp; Fonts =-</h2>
<p><a title="Get your stock photo on, for free!" href="http://www.webresourcesdepot.com/12-amazing-and-free-stock-photo-resources/" target="_blank">http://www.webresourcesdepot.com/12-amazing-and-free-stock-photo-resources/</a> - the link name says it all, a round up of free stock image resources.</p>
<p><a title="Sweep sweep sweep, all day long..." href="http://speckyboy.com/2010/01/13/50-photoshop-brush-collections-1000s-of-brushes/" target="_blank"> http://speckyboy.com/2010/01/13/50-photoshop-brush-collections-1000s-of-brushes/</a> - Holy brushes batman!</p>
<p><a title="I have gimp because I quit pirating, now I'm lonely and afraid of new things." href="http://www.junauza.com/2010/01/20-more-awesome-gimp-brush-sets.html" target="_blank"> http://www.junauza.com/2010/01/20-more-awesome-gimp-brush-sets.html</a> - Yay for gimp brushes (and sorry to those who can't hit deviantart due to a freakishly restrictive opendns setting and/or proxy)</p>
<p><a title="same 20 with a few new ones, and the ones you always skip" href="http://designreviver.com/freebies/50-free-dark-grungy-fonts-and-textures/" target="_blank"> http://designreviver.com/freebies/50-free-dark-grungy-fonts-and-textures/</a> - Some of the fonts I've linked to before, but it's always nice to group your grunge.</p>
<p><a title="Grunge is the new retro" href="http://www.noupe.com/freebie/free-grunge-styles-and-resources.html" target="_blank"> http://www.noupe.com/freebie/free-grunge-styles-and-resources.html</a> - Some nice grunge styles for the photoshoppers in our audience.</p>
<p><a title="Textures are the new grunge" href="http://www.texturepalace.com/" target="_blank"> http://www.texturepalace.com/</a> - Lots and lots and lots of textures</p>
<p><a title="Someday when I get photoshop again, I'm going to go over this list. Of course CS5 came out, so this is probably not that great now." href="http://speckyboy.com/2010/02/22/a-round-up-of-50-fresh-photoshop-tutorials-and-techniques/" target="_blank"> http://speckyboy.com/2010/02/22/a-round-up-of-50-fresh-photoshop-tutorials-and-techniques/</a> - Nice photoshop tutorial list</p>
<p><a title="So I can just take these?" href="http://www.iconfinder.net/free_icons" target="_blank"> http://www.iconfinder.net/free_icons</a> - something like 10k free icons for the taking</p>
<p><a title="Adding wings to a dragonfly, wings!?" href="http://www.noupe.com/tutorial/40-outstanding-photo-manipulation-tutorials.html" target="_blank"> http://www.noupe.com/tutorial/40-outstanding-photo-manipulation-tutorials.html</a> - a round up of photo manipulation tutorials</p>
<p><a title="I got apps in small places where the blah blech blah and the ...." href="http://speckyboy.com/2010/03/08/14-free-mobile-app-development-icon-sets/" target="_blank"> http://speckyboy.com/2010/03/08/14-free-mobile-app-development-icon-sets/</a> - free icons for the next time you make a mobile app</p>
<p><a title="Free doesn't always mean good, or quality" href="http://365psd.com/day/23/" target="_blank"> http://365psd.com/day/23/</a> - a free psd every day of the year... could be meh, could be great, time will tell right?</p>
<p><a title="On Sale NOW!" href="http://webdesignledger.com/freebies/the-best-e-commerce-icons-all-in-one-place" target="_blank"> http://webdesignledger.com/freebies/the-best-e-commerce-icons-all-in-one-place</a> - Yep, just what the link says.</p>
<p><a title="More icons for the taking" href="http://pc.de/icons/" target="_blank"> http://pc.de/icons/</a> - 4 free icon sets. Yay for free!</p>
<p><a title="Didn't like the icons in the previous links? try searching here for one" href="http://findicons.com/" target="_blank"> http://findicons.com/</a> - an icon search engine.</p>
<p><a title="Compression good, Speed good, bloat bad!" href="http://www.webdesignerdepot.com/2010/03/techniques-for-squeezing-images-for-all-they%e2%80%99re-worth/" target="_blank"> http://www.webdesignerdepot.com/2010/03/techniques-for-squeezing-images-for-all-they%e2%80%99re-worth/</a> - fantastic article on how to maximize your image squeezery.</p>
<p><a title="Calligraphy will be what we currently call chicken scratch in about 80 years." href="http://www.noupe.com/fonts/10-free-beautiful-calligraphic-fonts.html" target="_blank"> http://www.noupe.com/fonts/10-free-beautiful-calligraphic-fonts.html</a> - Get your calligraphy on with these free* fonts (*always check the free, cos sometimes free is personal use only).</p>
<p><a title="Font Dropper!" href="http://www.webdesignerwall.com/general/30-free-fonts-for-creative-projects/" target="_blank"> http://www.webdesignerwall.com/general/30-free-fonts-for-creative-projects/</a> - more font round up, yes they include some fonts that have been listed before, but I think I saw a few new ones in there too.</p>
<p><a title="Cheesey but useable with those manager types (you know the ones I'm talking about)" href="http://www.browsercover.com/" target="_blank"> http://www.browsercover.com/</a> - while the layout sucks, the site is pretty cool, upload an image and have it place a browser around it <img src='http://dev.tonic1394.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a title="Words escape me" href="http://www.smashingmagazine.com/2010/04/15/the-ultimate-free-web-designer-s-icon-set-750-icons-incl-psd-sources/" target="_blank"> http://www.smashingmagazine.com/2010/04/15/the-ultimate-free-web-designer-s-icon-set-750-icons-incl-psd-sources/</a> - huge icon set, plenty of goodness for whatever you are working on.</p>
<h2>-= Mac =-</h2>
<p><a title="My harddrive broke on my imac, so I have a $1.5k piece of glass and metal resting on my desk." href="http://devsnippets.com/article/20-new-extremely-useful-mac-apps-for-designers.html" target="_blank">http://devsnippets.com/article/20-new-extremely-useful-mac-apps-for-designers.html</a> - Mac users, I haven't forgotten about you, here's another list of utils you can use when you develop.</p>
<p>That should keep you busy for a while, hopefully long enough for me to get next months LinkPost ready to go.  As always, corrections, concerns, and the like are appreciated in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/05/linkpost-jan-through-april-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuration is frozen</title>
		<link>http://dev.tonic1394.com/2010/04/configuration-is-frozen/</link>
		<comments>http://dev.tonic1394.com/2010/04/configuration-is-frozen/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 16:39:34 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[struts]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=434</guid>
		<description><![CDATA[While in your Java development journey, if you find yourself getting an Error 500 NullPointerException and your console shows "IllegalStateException: Configuration is frozen", you could be the victim of what I experienced this week. I wanted my forwarding to actually redirect to a new action so that the decorator would be applied to the new [...]]]></description>
			<content:encoded><![CDATA[<p>While in your Java development journey, if you find yourself getting an Error 500 NullPointerException and your console shows "IllegalStateException: Configuration is frozen", you could be the victim of what I experienced this week.</p>
<p>I wanted my forwarding to actually redirect to a new action so that the decorator would be applied to the new action instead of the current one, so I tried this approach:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p434code25'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p43425"><td class="code" id="p434code25"><pre class="java" style="font-family:monospace;">forward <span style="color: #339933;">=</span> mapping.<span style="color: #006633;">findForward</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;blahblah&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
forward.<span style="color: #006633;">setRedirect</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This doesn't work.  The reason is because the forward that you are using is defined in the struts config file, so you are attempting to modify an existing forward. This is not what you want to do because it will affect ALL future uses of that forward, hence the error. Here is the correct way to accomplish this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p434code26'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p43426"><td class="code" id="p434code26"><pre class="java" style="font-family:monospace;">forward <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ActionForward<span style="color: #009900;">&#40;</span>mapping.<span style="color: #006633;">findForward</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;blahblah&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
forward.<span style="color: #006633;">setRedirect</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>UPDATE: An astute reader pointed out that this is probably only an issue if you haven't set redirect="true" in your struts config, and that you should always set redirect to true if you are forwarding to another action anyway.  Good catch Casey!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/04/configuration-is-frozen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jQuery to Make a Smart Search</title>
		<link>http://dev.tonic1394.com/2010/04/using-jquery-to-make-a-smart-search/</link>
		<comments>http://dev.tonic1394.com/2010/04/using-jquery-to-make-a-smart-search/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 20:29:17 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Smart Form]]></category>

		<guid isPermaLink="false">http://dev.tonic1394.com/?p=419</guid>
		<description><![CDATA[Recently I've been forced to develop a relationship with jQuery (something I had no interest in while I was working with team awesome). I have to admit it has been quite pleasant and my tolerance has grown into a very strong liking of the library (so I'm a little slow). This proved very useful when [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I've been forced to develop a relationship with jQuery (something I had no interest in while I was working with team awesome). I have to admit it has been quite pleasant and my tolerance has grown into a very strong liking of the library (so I'm a little slow). This proved very useful when I was asked to make a search field do more than just search for an ID. I decided NOT to fowl up our nice sleek looking header with a clunky drop down box, instead I turned to jQuery to make the search bar intuitive...observe.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p419code30'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p41930"><td class="code" id="p419code30"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchForm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</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;">//the regular expressions in this function are not meant for validation as much as determining which value to search by.</span>
	<span style="color: #003366; font-weight: bold;">var</span> submitted_appid <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.search input[name=AppID]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^[\d]+$/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>submitted_appid<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">//do nothing since the input is already properly named</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^[\d-]+$/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>submitted_appid<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">//change name of input to SSN</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.search input[name=AppID]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;SSN&quot;</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: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^[A-Za-z]+$/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>submitted_appid<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">//change name of input to LastName</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.search input[name=AppID]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;LastName&quot;</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: #006600; font-style: italic;">//no match, alert the rep and return false</span>
		<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;invalid search value:<span style="color: #000099; font-weight: bold;">\n</span>for SSN please use numbers and at least one dash '-'<span style="color: #000099; font-weight: bold;">\n</span> for LastName use only letters<span style="color: #000099; font-weight: bold;">\n</span> for AppID use only numbers&quot;</span><span style="color: #009900;">&#41;</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: #006600; font-style: italic;">//there was a match add an action and submit the form.</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'search.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</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: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The HTML</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p419code31'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p41931"><td class="code" id="p419code31"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;search&quot;&gt;
    &lt;form id=&quot;searchForm&quot; name=&quot;searchForm&quot; method=&quot;post&quot; action=&quot;&quot;&gt;
	&lt;input type=&quot;text&quot; name=&quot;AppID&quot; value=&quot;Search...&quot; /&gt;
    &lt;/form&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>Then your search app would do something like the following</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p419code32'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p41932"><td class="code" id="p419code32"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'AppID'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #666666; font-style: italic;">//enter sql code here</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SSN'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//enter sql code here</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'LastName'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #666666; font-style: italic;">//enter sql code here</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Basically the jQuery decides what to search on based on the characters in the input field, if the wrong mix of characters is present then we fire off an alert message notifying the <del datetime="2010-04-14T20:31:28+00:00">irresponsible</del> party and correcting their <del datetime="2010-04-14T20:31:28+00:00">ignorant</del> ways.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.tonic1394.com/2010/04/using-jquery-to-make-a-smart-search/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 2.989 seconds -->
