<?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>ThatGuyCharlie &#124; Charlie Mathews Blog &#38; Portfolio &#187; Javascript</title>
	<atom:link href="http://www.thatguycharlie.com/tag/javascript-how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thatguycharlie.com</link>
	<description>Charlie Mathews Blog &#38; Portfolio</description>
	<lastBuildDate>Fri, 28 Oct 2011 05:05:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to Display Dymanicly Timed Content using Javascript</title>
		<link>http://www.thatguycharlie.com/2009/how-to-display-content-by-the-time-of-day/</link>
		<comments>http://www.thatguycharlie.com/2009/how-to-display-content-by-the-time-of-day/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 23:11:34 +0000</pubDate>
		<dc:creator>Charlie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[How to Display Dymanicly Timed Content with JavaScript]]></category>
		<category><![CDATA[time of day content]]></category>

		<guid isPermaLink="false">http://www.thatguycharlie.com/?p=821</guid>
		<description><![CDATA[I&#8217;ve spent many a long hour playing with this javascript to make it work seamlessly. You can see the results, daily, on my website. If you want to change your website background depending on the time of day you will need this specific code. Otherwise, make sure to read till the bottom so you understand [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent many a long hour playing with this javascript to make it work seamlessly. You can see the results, daily, on my website.</p>
<p>If you want to change your website background depending on the time of day you will need this specific code. Otherwise, make sure to read till the bottom so you understand and don&#8217;t come back to me asking why it isn&#8217;t working for you.</p>
<table border="0">
<tbody>
<tr>
<td>
<p>Nighttime on ThatGuyCharlie</p>
<p><img class="enhanimg" title="ThatGuyCharlie night-time background" src="http://www.thatguycharlie.com/wp-content/themes/scyhigh/img/night.png" alt="[image: TGCNight]" width="200" height="100" /></p>
</td>
<td>
<p>Daytime on ThatGuyCharlie</p>
<p><img class="enhanimg" title="ThatGuyCharlie Day-time Background" src="http://www.thatguycharlie.com/wp-content/themes/scyhigh/img/dayclouds.png" alt="[image: TGCDay]" width="200" height="100" /></p>
</td>
</tr>
</tbody>
</table>
<p><span id="more-821"></span>Copy this text into your webpage before the </head> tag.</p>
<p><span style="font-family: courier new,courier;"><script type="text/javascript"><br />
 <!--<br />
 now = new Date</span></p>
<p><span style="font-family: courier new,courier;">if (now.getHours() < 4) {<br />
 document.write("</p>
<style>html {background: #101318 url(\"http://www.thatguycharlie.com/wp-content/themes/scyhigh/img/night.png\") top center no-repeat;}</style>
<p>")<br />
 }<br />
 else if (now.getHours() < 10) {<br />
 document.write("</p>
<style>html {background: #101318 url(\"http://www.simpleshare.vividperfection.com/privateuploads/morningmountains.png\") top center no-repeat;}</style>
<p>")<br />
 }<br />
 else if (now.getHours() < 20) {<br />
 document.write("</p>
<style>html {background: #101318 url(\"http://www.thatguycharlie.com/wp-content/themes/scyhigh/img/dayclouds.png\") top center no-repeat;}</style>
<p>")<br />
 }<br />
 else if (now.getHours() < 24) {<br />
 document.write("</p>
<style>html {background: #101318 url(\"http://www.thatguycharlie.com/wp-content/themes/scyhigh/img/night.png\") top center no-repeat;}</style>
<p>")<br />
 }<br />
 //--><br />
 </script></span></p>
<p><strong>Ok now, if you didnt understand that, here&#8217;s what&#8217;s happening.</strong></p>
<p><br class="spacer_" /></p>
<p><span style="font-family: courier new,courier;">now = new Date</span></p>
<p><strong>Here we obtain the date from the user&#8217;s computer</strong></p>
<p><br class="spacer_" /></p>
<p><span style="font-family: courier new,courier;">if (now.getHours() < 4) {<br />
 document.write(&#8220;</p>
<style>html {background: #101318 url(\"http://www.thatguycharlie.com/wp-content/themes/scyhigh/img/night.png\") top center no-repeat;}</style>
<p>&#8220;)<br />
 }</span></p>
<p><strong>This bit of code says that if the hour of the day is before four o&#8217;clock AM, then print the css background style for night-time.</strong></p>
<p><br class="spacer_" /></p>
<p><span style="font-family: courier new,courier;">else if (now.getHours() < 10) {<br />
 document.write(&#8220;</p>
<style>html {background: #101318 url(\"http://www.simpleshare.vividperfection.com/privateuploads/morningmountains.png\") top center no-repeat;}</style>
<p>&#8220;)<br />
 }</span></p>
<p><strong>Again, this does the same, but checks to see if it is before 10 o&#8217;clock.</strong></p>
<p><br class="spacer_" /></p>
<p><span style="font-family: courier new,courier;">else if (now.getHours() < 24)</span></p>
<p><strong>Remember to have this last part of your code so the script knows what to do up till midnight. The first code which defines &#8220;< 4" will only display the specified content from zero o'clock until 4 o'clock so to display content till midnight, you must have "< 24".</strong></p>
<p><strong><br />
 </strong></p>
<p>You can use this code and copy in different content to display at any time of the day by changing the hours. If you didn&#8217;t understand any of that, don&#8217;t worry! Test out the code at the top on your web-page and see if you can make it work. If not, comment below and I will try to help you out.</p>
<p><br class="spacer_" /></p>
<p>If you want to display symbols like apostrophes &#8221; and backward slashes \ make sure to put a &#8220;\&#8221; before each one so that java-script recognizes it and dosen&#8217;t mess up your code.</p>
<p>Example of the WRONG way:</p>
<p>document.write(&#8220;hi! my friend said <span style="background-color: #ff0000;">&#8220;</span>I am going to the store<span style="background-color: #ff0000;"> </span><span style="background-color: #ff0000;">&#8220;</span>&#8220;);</p>
<p>Example of the RIGHT way:</p>
<p>document.write(&#8220;hi! my friend said <span style="background-color: #ff0000;">\&#8221;</span>I am going to the store<span style="background-color: #ff0000;">\&#8221;</span>&#8220;);</p>
<img src="http://www.thatguycharlie.com/?ak_action=api_record_view&id=821&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.thatguycharlie.com/2009/how-to-display-content-by-the-time-of-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: JS Bookmark Script</title>
		<link>http://www.thatguycharlie.com/2009/how-to-js-bookmark-script/</link>
		<comments>http://www.thatguycharlie.com/2009/how-to-js-bookmark-script/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 20:25:09 +0000</pubDate>
		<dc:creator>Charlie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.vividperfection.com/?p=714</guid>
		<description><![CDATA[This easy to implement Javascript bookmark script takes advantages of JS technology to provide functionality in most popular browsers like Internet Explorer and Firefox. Put this between the &#60;head&#62;&#60;/head&#62; tags of your webpage. &#60;script type=&#8221;text/javascript&#8221;&#62;&#60;!&#8211; function bookmarksite(title,url){ if (window.sidebar) window.sidebar.addPanel(title, url, &#8220;&#8221;); else if(window.opera &#38;&#38; window.print){ var elem = document.createElement(&#8216;a&#8217;); elem.setAttribute(&#8216;href&#8217;,url); elem.setAttribute(&#8216;title&#8217;,title); elem.setAttribute(&#8216;rel&#8217;,'sidebar&#8217;); elem.click(); } [...]]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td>This easy to implement Javascript bookmark script takes advantages of JS technology to provide functionality in most popular browsers like Internet Explorer and Firefox.</td>
<td></td>
</tr>
<tr>
<td><strong>Put this between the &lt;head&gt;&lt;/head&gt; tags of your webpage.</strong></p>
<p><br class="spacer_" /></p>
<form> <textarea cols="40" rows="6" name="jsbkmark">&lt;script type=&#8221;text/javascript&#8221;&gt;&lt;!&#8211; function bookmarksite(title,url){ if (window.sidebar) 	window.sidebar.addPanel(title, url, &#8220;&#8221;); else if(window.opera &amp;&amp; window.print){ 	var elem = document.createElement(&#8216;a&#8217;); 	elem.setAttribute(&#8216;href&#8217;,url); 	elem.setAttribute(&#8216;title&#8217;,title); 	elem.setAttribute(&#8216;rel&#8217;,'sidebar&#8217;); 	elem.click(); }  else if(document.all) 	window.external.AddFavorite(url, title); } // &#8211;&gt;&lt;script&gt;</textarea></form>
<p><strong>Put this anywhere between the &lt;body&gt;&lt;/body&gt; tags. </strong></p>
<form> <textarea cols="40" rows="6" name="jsbkmark">&lt;a href=&#8221;javascript:bookmarksite(&#8216;A Cool JS Bookmark Code&#8217;, &#8216;http://vividperfection.com&#8217;)&#8221; mce_href=&#8221;javascript:bookmarksite(&#8216;A Cool JS Bookmark Code&#8217;, &#8216;http://vividperfection.com&#8217;)&#8221;&gt;Add This Code To Favorites&lt;/a&gt;</textarea></form>
<form> </form>
<form>&gt; <a href="http://www.simpleshare.vividperfection.com/uploads/js bookmkark code.html">Click HERE to download the script</a> &lt;<br />
 </form>
</td>
<td></td>
</tr>
</tbody>
</table>
<img src="http://www.thatguycharlie.com/?ak_action=api_record_view&id=714&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.thatguycharlie.com/2009/how-to-js-bookmark-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Plugins You Just can&#039;t Live Without</title>
		<link>http://www.thatguycharlie.com/2009/firefox-plugins-you-just-cant-live-without/</link>
		<comments>http://www.thatguycharlie.com/2009/firefox-plugins-you-just-cant-live-without/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:44:47 +0000</pubDate>
		<dc:creator>Charlie</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bar]]></category>
		<category><![CDATA[cant live without]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[download status bar]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[fox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[in]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[percentage]]></category>
		<category><![CDATA[plug]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[pop-up]]></category>
		<category><![CDATA[pup-up]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://www.vividperfection.com/?p=673</guid>
		<description><![CDATA[After, using Internet Explorer for years, the speed and amazing customization abilities of Firefox astounded me. I finally understood why people went on and on about &#8220;Firefox, the best browser ever&#8221;. Even so, it took me a while to find customizations (plugins) which could really tap into the full power of this new browser. Here [...]]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td>After, using Internet Explorer for years, the speed and amazing customization abilities of <a href="http://www.mozilla.com/en-US/firefox/personal.html">Firefox</a> astounded me. I finally understood why people went on and on about &#8220;Firefox, the best browser ever&#8221;. Even so, it took me a while to find customizations (plugins) which could really tap into the full power of this new browser. Here are the top choices I use as a web developer and full time internet surfer.</td>
<td><img src="http://www.simpleshare.vividperfection.com/uploads/firefoxtrans1.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>1) <a href="https://addons.mozilla.org/en-US/firefox/addon/26">Download Status Bar</a><br />
 No Kidding, If it were not for this smart plug-in, I would become a raving maniac a long time ago. The number of small file downloads I make on a regular basis causes the constant download box pop-ups to turn into a big pain. The <a href="https://addons.mozilla.org/en-US/firefox/addon/26">Download Status Bar</a> packs all the information you want to see such as download name, speed, and amount completed into a status bar which appears at the bottom of your browser for easy and uninterrupted browsing.<span id="more-673"></span></p>
<p>2) <a href="http://getfirebug.com/">Firebug</a></p>
<p>This plug-in is the ultimate tool for any web developer using HTML, CSS, and Javascript. It allows you to edit your web page and view the changes in real time. You can hover over elements in your code and see exactly how your div&#8217;s are being positioned and displayed with a highlight tool. Over all it&#8217;s other features, my favorite is the ability to edit HTML and CSS for any element in an instant.</p>
<p>3) <a href="https://www.xmarks.com/">Xmarks</a> (FoxMarks)</p>
<p>Over the years, I have often lost computers to fatal errors and blue screens. In doing so, I lost all my bookmarks which are essential to my daily work online. This nifty service saves you from ever having that problem. It backs up your bookmarks every time you exit the browser and they are then made available to you online or restore-able to a new computer.</p>
<p>4) <a href="http://www.downloadhelper.net/">DownloadHelper</a></p>
<p>Ever seen media players in a web-page with no download option? This easy to use plugin tracks actively streaming videos and mp3&#8242;s and makes it possible for you to download videos from most popular sharing sites.</p>
<p>5) <a href="https://addons.mozilla.org/en-US/firefox/addon/201">DownThemAll!</a></p>
<p>For easy file downloads, this download manager is the first of it&#8217;s kind available in <a href="http://www.mozilla.com/en-US/firefox/personal.html">Firefox</a>. It makes the job of downloading split files a whole bunch easier without installing extra, spyware ridden software.</p>
<p><br class="spacer_" /></p>
<img src="http://www.thatguycharlie.com/?ak_action=api_record_view&id=673&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.thatguycharlie.com/2009/firefox-plugins-you-just-cant-live-without/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

