<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Yacoblog - JavaScript</title>
			<link>http://techfeed.net/blog/index.cfm</link>
			<description>News and Views, Yacoubean style</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 01:29:23 -0600</pubDate>
			<lastBuildDate>Fri, 04 Dec 2009 08:10:00 -0600</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>yacoubean@gmail.com</managingEditor>
			<webMaster>yacoubean@gmail.com</webMaster>
			
			<item>
				<title>JavaScript calculator</title>
				<link>http://techfeed.net/blog/index.cfm/2009/12/4/JavaScript-calculator</link>
				<description>
				
				A few years ago when I was bored I created a simple calculator (you know, the kind you use to do math problems) in Javascript.  I was recently cleaning out an old hard drive and found it, and I thought I would share this &lt;a href=&quot;/calculator.html&quot;&gt;Javascript calulator&lt;/a&gt; for anybody that might have a use for something like this in your web apps.  I don&apos;t care to dump all the code in this post, you can view source on the page to see how it works. 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Fri, 04 Dec 2009 08:10:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2009/12/4/JavaScript-calculator</guid>
				
			</item>
			
			<item>
				<title>Warfish bookmarklets</title>
				<link>http://techfeed.net/blog/index.cfm/2009/8/14/Warfish-bookmarklets</link>
				<description>
				
				One thing that has long bothered me while playing &lt;a href=&quot;http://warfish.net/&quot;&gt;warfish&lt;/a&gt; is that when creating a tournament (or joining one that lets you invite players), they don&apos;t have an option to select all players with zero boots on their record.  Well, I finally decided to write a JavaScript bookmarklet to accomplish this.  If you drag the one or both of the links below into your bookmarks, when playing warfish and inviting players, if you click these bookmarks all of the players with zero boots (or less than 3) will be selected.

I know most of my readers won&apos;t care about this, but I wanted to post it here for future reference.

&lt;a href=&quot;javascript:(function%20zeroBoots(){var%20nobrs%20=%20document.getElementsByTagName(&apos;nobr&apos;);var%20fewBoots%20=%20new%20Array();for(var%20i%20=%200;%20i%20&lt;%20nobrs.length;%20i++){if%20((nobrs[i].innerHTML.match(&apos;input&apos;))%20&amp;&amp;%20(!nobrs[i].innerHTML.match(&apos;boots&apos;))){var%20noBootInput%20=%20nobrs[i].getElementsByTagName(&apos;input&apos;)[0].name;document.getElementsByName(noBootInput)[0].checked%20=%20true;}}})();&quot;&gt;Warfish: 0 boots&lt;/a&gt;

&lt;a href=&quot;javascript:(function%20zeroBoots(){var%20nobrs%20=%20document.getElementsByTagName(&apos;nobr&apos;);var%20fewBoots%20=%20new%20Array();for(var%20i%20=%200;%20i%20&lt;%20nobrs.length;%20i++){if%20((nobrs[i].innerHTML.match(&apos;input&apos;))%20&amp;&amp;%20(!nobrs[i].innerHTML.match(&apos;red&apos;))){var%20noBootInput%20=%20nobrs[i].getElementsByTagName(&apos;input&apos;)[0].name;document.getElementsByName(noBootInput)[0].checked%20=%20true;}}})();&quot;&gt;Warfish: &gt;3 boots&lt;/a&gt; 
				</description>
				
				<category>Games/Software</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Fri, 14 Aug 2009 20:00:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2009/8/14/Warfish-bookmarklets</guid>
				
			</item>
			
			<item>
				<title>Embrace JavaScript and SQL</title>
				<link>http://techfeed.net/blog/index.cfm/2009/3/2/Embrace-JavaScript-and-SQL</link>
				<description>
				
				I have always been puzzled by many web developer&apos;s reticence to learn and fully take advantage of JavaScript and SQL in their applications.  I know many people are comfortable with these languages and use them frequently, but I often run into people that say something like this: &quot;I HATE JavaScript and I avoid it at all costs&quot;, or this: &quot;I never really learned SQL, and anytime I need to do anything complex I ask my SQL guru friend.&quot;  [More]
				</description>
				
				<category>SQL</category>				
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Mon, 02 Mar 2009 10:50:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2009/3/2/Embrace-JavaScript-and-SQL</guid>
				
			</item>
			
			<item>
				<title>Deselect all items in a Select List</title>
				<link>http://techfeed.net/blog/index.cfm/2008/3/5/Deselect-all-items-in-a-Select-List</link>
				<description>
				
				Say you want to have a &quot;unselect all&quot; button for a select list, how would the JavaScript work?  I just spent too long trying to figure out how to do this in IE.  As usual, I got it to work in Firefox right away, but IE doesn&apos;t work the same way.  [More]
				</description>
				
				<category>Microsoft</category>				
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Wed, 05 Mar 2008 11:15:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2008/3/5/Deselect-all-items-in-a-Select-List</guid>
				
			</item>
			
			<item>
				<title>Speed up page loads, defer your JavaScript</title>
				<link>http://techfeed.net/blog/index.cfm/2007/9/28/Speed-up-page-loads-defer-your-JavaScript</link>
				<description>
				
				A coworker of mine showed me something today that looks interesting.  Say you&apos;ve got a page with a lot of client site JS code that runs AFTER the page is loaded.  Things like form validation, Ajax functions, stuff like that.  Well, apparently you can add a defer attribute to your script tag, and the browser will not load the JS file until AFTER the page has been fully loaded and displayed to the user.  With JavaScript heavy sites, this could dramatically decrease page load times.  Here&apos;s an example:

&amp;lt;script src=&quot;script.js&quot; type=&quot;text/javascript&quot; defer=&quot;defer&quot;&amp;gt;&amp;lt;/script&amp;gt;

I am not sure if this works in all browsers, and I&apos;m not sure if it causes any problems.  If anybody has any experience with this, please drop me a comment. 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Fri, 28 Sep 2007 09:56:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2007/9/28/Speed-up-page-loads-defer-your-JavaScript</guid>
				
			</item>
			
			<item>
				<title>You can do &lt;em&gt;that&lt;/em&gt; with JavaScript?</title>
				<link>http://techfeed.net/blog/index.cfm/2007/1/10/You-can-do-emthatem-with-JavaScript</link>
				<description>
				
				I saw this &lt;a href=&quot;http://www.whenpenguinsattack.com/2007/01/10/5-cool-javascript-apps/&quot;&gt;blog entry&lt;/a&gt; today on digg that highlighted 5 cool apps written entirely in JavaScript.  There are 3 games, including an FPS engine demo (without any shooting or enemies, but still very impressive).  Also, a cool soccer game.  I had no idea this kind of thing was possible with JS.  I thought you&apos;d need something like Flash or Java.  This makes me much more excited about some of the ideas I&apos;ve had lately, but I still don&apos;t know if I&apos;ll have enough ambition to do them...maybe I&apos;ll stick with my simple ColdFusion projects.  :) 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Wed, 10 Jan 2007 18:38:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2007/1/10/You-can-do-emthatem-with-JavaScript</guid>
				
			</item>
			
			<item>
				<title>See what server software any site is running</title>
				<link>http://techfeed.net/blog/index.cfm/2006/6/9/netcraft</link>
				<description>
				
				Often times I wonder what web server and/or operating system a website is running.  I usually just go to &lt;a href=&quot;http://www.netcraft.com/&quot;&gt;Netcraft&lt;/a&gt; and use their &quot;What&apos;s that site running?&quot; tool.  But since I&apos;m lazy, I decided to write a bookmarklet to make this easier.  Now I just have to click my Scope Server bookmarklet when on the site in question, and I get Netcraft&apos;s site report.

This doesn&apos;t always work.  The reason that Netcraft&apos;s spiders can find out what software a server is running is because the data comes back in the HTTP headers.  But the server admin might chose to turn that off, in which case Netcraft returns &apos;Unknown&apos;.  But in my experience, 99% of the site&apos;s I try return the data I&apos;m after (using Netcraft&apos;s tool).

If you want to do this yourself, just drag this link up to your tool bar, or bookmarks folder: &lt;a href=&quot;javascript:void(location.href=&apos;http://uptime.netcraft.com/up/graph?site=&apos;+location.hostname)&quot; onmouseover=&quot;window.status=&apos;&apos;;return true&quot; onclick=&quot;return false&quot;&gt;Scope Server&lt;/a&gt;, or right click it and add it to your bookmarks.

By the way, Netcraft also publishes a &lt;a href=&quot;http://news.netcraft.com/archives/web_server_survey.html&quot;&gt;monthly web server survey&lt;/a&gt; that I like to watch.  Right now Apache is at about 61% while MS IIS is about 30%.  One thing that bothers me about Netcraft&apos;s survey&apos;s is that they don&apos;t do any data cleaning.  There are millions of sites parked at hosts like GoDaddy, with no web site.  Netcraft counts these, and if I were making these reports I&apos;d try to filter that kind of stuff out. 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Fri, 09 Jun 2006 07:26:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2006/6/9/netcraft</guid>
				
			</item>
			
			<item>
				<title>JavaScript isNumeric function</title>
				<link>http://techfeed.net/blog/index.cfm/2006/2/23/JavaScript-isNumeric-function</link>
				<description>
				
				The other day I needed to check a value to make sure it&apos;s numeric, using JavaScript (it was an Ajax app).  I poked around online and a few sites said that JS doesn&apos;t have such a function.  I also found a few sites that offered an isNumeric function, but most of them didn&apos;t check for decimals and/or negatives.  So I created my own using a Regular Expression:
&lt;code&gt;
function isNumeric(x) {
   // I use this function like this: if (isNumeric(myVar)) { }

   // regular expression that validates a value is numeric

var RegExp = /^(-)?(\d*)(\.?)(\d*)$/; // Note: this WILL allow a number that ends in a decimal: -452.

   // compare the argument to the RegEx

   // the &apos;match&apos; function returns 0 if the value didn&apos;t match

   var result = x.match(RegExp);
   return result;
}
&lt;/code&gt; 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<pubDate>Thu, 23 Feb 2006 07:35:00 -0600</pubDate>
				<guid>http://techfeed.net/blog/index.cfm/2006/2/23/JavaScript-isNumeric-function</guid>
				
			</item>
			</channel></rss>