<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Development is my life &#187; JavaScript</title>
	<atom:link href="http://www.acidrazor.com/blog/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acidrazor.com/blog</link>
	<description>a resource of everything I know about Web Development or related technology including some articles I find interesting</description>
	<lastBuildDate>Tue, 17 Nov 2009 09:55:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>IP-to-Country lookup, for free and 95% accurate</title>
		<link>http://www.acidrazor.com/blog/ip-to-country-lookup-for-free-and-95-accurate/</link>
		<comments>http://www.acidrazor.com/blog/ip-to-country-lookup-for-free-and-95-accurate/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 05:49:26 +0000</pubDate>
		<dc:creator>AcidRaZor</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming 101]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[Country Code]]></category>
		<category><![CDATA[Country Database]]></category>
		<category><![CDATA[Countrycode]]></category>
		<category><![CDATA[Free Javascript]]></category>
		<category><![CDATA[Ip Address]]></category>
		<category><![CDATA[Ip Lookup]]></category>
		<category><![CDATA[Ip Number]]></category>
		<category><![CDATA[Javascript Api]]></category>
		<category><![CDATA[Javascript City]]></category>
		<category><![CDATA[Maxmind]]></category>
		<category><![CDATA[Sports]]></category>

		<guid isPermaLink="false">http://www.acidrazor.com/blog/?p=68</guid>
		<description><![CDATA[One of my recent posts showed you how to convert an IP address to an IP number so you could do a lookup on a IP-to-Country database.
However, I&#8217;ve found the next best thing. Maxmind.com is one of the leaders in GeoIP location and sports a database that is more than 99% accurate. That&#8217;s the paid [...]]]></description>
			<content:encoded><![CDATA[<p>One of my recent posts showed you <a href="http://www.acidrazor.com/blog/ip-to-country-convert-ip-address-to-ip-number/">how to convert an IP address to an IP number</a> so you could do a lookup on a IP-to-Country database.</p>
<p>However, I&#8217;ve found the next best thing. Maxmind.com is one of the leaders in GeoIP location and sports a database that is more than 99% accurate. That&#8217;s the paid version. For my project though, I only needed to know the country, and had to be pretty accurate.</p>
<p>Welcome Maxmind&#8217;s free JavaScript addon API! 95% accurate and does what I want it to do.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://j.maxmind.com/app/country.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">var</span> countryCode <span style="color: #339933;">=</span> geoip_country_code<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>countryCode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And that&#8217;s IT! You don&#8217;t have to host the database, you don&#8217;t have to do the number conversion yourself and pretty much everything else is taken care for you. The free service also included City lookups! Include and enjoy!</p>
<p>Here&#8217;s the link to their site: <a href="http://www.maxmind.com/app/javascript_city">http://www.maxmind.com/app/javascript_city</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acidrazor.com/blog/ip-to-country-lookup-for-free-and-95-accurate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looping through a 2-dimensional array with jQuery</title>
		<link>http://www.acidrazor.com/blog/looping-through-a-2-dimensional-array-with-jquery/</link>
		<comments>http://www.acidrazor.com/blog/looping-through-a-2-dimensional-array-with-jquery/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 05:43:25 +0000</pubDate>
		<dc:creator>AcidRaZor</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming 101]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[163]]></category>
		<category><![CDATA[Australian Dollar]]></category>
		<category><![CDATA[British Pound]]></category>
		<category><![CDATA[Cad]]></category>
		<category><![CDATA[Canadian Dollar]]></category>
		<category><![CDATA[Dimensional Array]]></category>
		<category><![CDATA[Drifts]]></category>
		<category><![CDATA[Eur Euro]]></category>
		<category><![CDATA[Fantasy]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Implementation]]></category>
		<category><![CDATA[Loop Through]]></category>
		<category><![CDATA[Lot]]></category>
		<category><![CDATA[New Zealand Dollar]]></category>
		<category><![CDATA[Nzd]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Wonderful World]]></category>

		<guid isPermaLink="false">http://www.acidrazor.com/blog/?p=66</guid>
		<description><![CDATA[I recently opened my eyes to the wonderful world of jQuery. *drifts off into a fantasy*
Here&#8217;s an example of how to loop through a 2-dimensional array using jQuery. Fun &#038; Easy:

1
2
3
4
5
6
7
var currencyTocountryName = &#91;&#91;'USD','U.S. Dollar (USD)','$'&#93;,&#91;'GBP','British Pound (GBP)','&#38;#163;'&#93;,&#91;'EUR','Euro (EUR)','&#38;#8364;'&#93;,&#91;'AUD','Australian Dollar (AUD)','$'&#93;,&#91;'CAD','Canadian Dollar (CAD)','$'&#93;,&#91;'NZD','New Zealand Dollar (NZD)','$'&#93;&#93;
$.each&#40; currencyTocountryName,
         [...]]]></description>
			<content:encoded><![CDATA[<p>I recently opened my eyes to the wonderful world of jQuery. *drifts off into a fantasy*</p>
<p>Here&#8217;s an example of how to loop through a 2-dimensional array using jQuery. Fun &#038; Easy:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> currencyTocountryName <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'USD'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'U.S. Dollar (USD)'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'$'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'GBP'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'British Pound (GBP)'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'&amp;#163;'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'EUR'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'Euro (EUR)'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'&amp;#8364;'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'AUD'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'Australian Dollar (AUD)'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'$'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'CAD'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'Canadian Dollar (CAD)'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'$'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'NZD'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'New Zealand Dollar (NZD)'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'$'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span>
$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> currencyTocountryName<span style="color: #339933;">,</span>
           <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> i<span style="color: #339933;">,</span> value <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                   <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                   <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</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>As you can see it&#8217;s pretty straight forward. No need to have &#8220;i&#8221; be the place holder, a simple value[0] will get you the first value in the array. This must be the easiest implementation of a loop and array I&#8217;ve done in years. Sure, by now I can do a simple JavaScript loop in my sleep. But without thinking and a lot less code, jQuery allows me to leverage off that power. *Drifts off into a fantasy once again*</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acidrazor.com/blog/looping-through-a-2-dimensional-array-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>toLowerCase() not a function error</title>
		<link>http://www.acidrazor.com/blog/tolowercase-not-a-function-error/</link>
		<comments>http://www.acidrazor.com/blog/tolowercase-not-a-function-error/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 07:44:31 +0000</pubDate>
		<dc:creator>AcidRaZor</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming 101]]></category>
		<category><![CDATA[Javascript Engine]]></category>
		<category><![CDATA[Point Answer]]></category>
		<category><![CDATA[Simple Solution]]></category>
		<category><![CDATA[String Object]]></category>

		<guid isPermaLink="false">http://www.acidrazor.com/blog/?p=52</guid>
		<description><![CDATA[What I found most annoying was that IE perfectly handled this, but not FireFox.
Here is what this &#8220;toLowerCase() not a function error&#8221; really means:
The object you&#8217;re trying to lowercase is NOT a string object. By using

1
alert&#40;typeof&#40;object&#41;&#41;;

 you can determine what type the JavaScript engine thinks the object is. A simple solution is:

1
object.toString&#40;&#41;.toLowerCase;

I hope someone finds [...]]]></description>
			<content:encoded><![CDATA[<p>What I found most annoying was that IE perfectly handled this, but not FireFox.</p>
<p>Here is what this &#8220;toLowerCase() not a function error&#8221; really means:</p>
<p>The object you&#8217;re trying to lowercase is NOT a string object. By using</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>object<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p> you can determine what type the JavaScript engine thinks the object is. A simple solution is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">object.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I hope someone finds this information helpful as it took me several hours of research on the internet to come up with a clear concise and TO THE POINT answer of what it actually could be and in fact, was.</p>
<p>I wish all the know-it-all&#8217;s would stop pretending they know anything about anything and just piss off of the internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acidrazor.com/blog/tolowercase-not-a-function-error/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
