<?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>Blue Arena &#187; xhtml</title>
	<atom:link href="http://www.bluearena.com/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bluearena.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 05 Jun 2010 17:23:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Quick Tip: Checking if a javascript function exists</title>
		<link>http://www.bluearena.com/2009/08/quick-tip-checking-if-a-javascript-function-exists/</link>
		<comments>http://www.bluearena.com/2009/08/quick-tip-checking-if-a-javascript-function-exists/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 13:14:15 +0000</pubDate>
		<dc:creator>Maloric</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[exist]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bluearena.com/?p=184</guid>
		<description><![CDATA[I recently had to write a javascript function that would be used across several sites, and it would call another function that might or might not exist on any of these sites.  There are probably a couple of ways you could get around the inevitable error caused by calling a function that doesn&#8217;t exist (I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to write a javascript function that would be used across several sites, and it would call another function that might or might not exist on any of these sites.  There are probably a couple of ways you could get around the inevitable error caused by calling a function that doesn&#8217;t exist (I&#8217;m thinking some sort of overload here), but I found that the simplest method is to wrap the function call in an if statement like so:</p>
<pre>if(typeof myFunction == 'function') {
	myFunction();
}</pre>
<p>Handy, huh?</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">if(typeof yourFunctionName == &#8216;function&#8217;) {<br />
yourFunctionName();<br />
}</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bluearena.com/2009/08/quick-tip-checking-if-a-javascript-function-exists/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
