<?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>WebDesign&#38;Such &#187; Javascript</title>
	<atom:link href="http://webdesignandsuch.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesignandsuch.com</link>
	<description>a Beantown Design Production</description>
	<lastBuildDate>Thu, 17 May 2012 23:40:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Add auto-updating Copyright to website – Javascript</title>
		<link>http://webdesignandsuch.com/add-an-auto-updating-copyright-on-your-website-with-javascript/</link>
		<comments>http://webdesignandsuch.com/add-an-auto-updating-copyright-on-your-website-with-javascript/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 14:23:46 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=725</guid>
		<description><![CDATA[Websites need to have the copyrights on them. Usually this is found in the footer of the site. As I was updating a client&#8217;s site the other day I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>Websites need to have the copyrights on them. Usually this is found in the footer of the site. As I was updating a client&#8217;s site the other day I noticed his copyright info was still 2009; so I updated it in the template, applied it to the pages, and re-uploaded everything to the live site.</p>
<p>One of the worst things you can do with your website is to not make updates once it&#8217;s live. Fresh content is the only thing that will keep your users AND search engines returning. One of the best ways to let users know that you never update your website (saaarcasm), is to have a copyright in the footer of your website from 2003. It really is a pain to have to go in at the first of every year to update all of your client&#8217;s websites though. Luckily, Javascript can save us. Using Javascript we can add a copyright to the webpage that will automatically update with the current year. Check out the demo, and then keep reading to grab the code.</p>
<p><a class="demo-link" href="http://www.webdesignandsuch.com/posts/js-copyright/index.html">View Demo</a></p>
<p><span id="more-725"></span></p>
<p>All you need to do is paste the following code right into the XHTML where you want the copyright to show up, Javascript does the rest!</p>
<div class="codeBox">&lt;p &gt;&amp;copy;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var currentTime = new Date()<br />
var year = currentTime.getFullYear()<br />
document.write(year)<br />
&lt;/script&gt;<br />
&lt;/p&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/add-an-auto-updating-copyright-on-your-website-with-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to create a Popup with CSS and Javascript</title>
		<link>http://webdesignandsuch.com/how-to-create-a-popup-with-css-and-javascript/</link>
		<comments>http://webdesignandsuch.com/how-to-create-a-popup-with-css-and-javascript/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 17:27:23 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=709</guid>
		<description><![CDATA[Popups suck. The good thing is you don&#8217;t see that many of them any more. That&#8217;s because browsers recognize that they suck and are most likely spam or ads and [...]]]></description>
			<content:encoded><![CDATA[<h2 style="margin-bottom: 20px;">Popups suck.</h2>
<p>The good thing is you don&#8217;t see that many of them any more. That&#8217;s because browsers recognize that they suck and are most likely spam or ads and so they block the popups. The old way of creating a popup was to force open a new browser window over the current browser window. So this is what browsers block. But what if you actually have a need to use a popup window for something useful and not spammy? This happened to me the other day. A client wanted a popup window on their homepage to wish everyone a Merry Christmas.</p>
<p>Knowing I couldn&#8217;t use the old popup method, I went searching. I knew it&#8217;d be easy enough to use CSS to put a floating div over the content of the site, which creates a popup effect. The problem was how do you close the popup once it&#8217;s open? Javascript would be needed for this. Check out the demo I setup which shows how the <strong>CSS popup</strong> can be set to open on <strong>pageload</strong> or by <strong>clicking on a link</strong>; and then how Javascript allows you to have a &#8220;close&#8221; button that shuts or hides the popup. Then continue reading for the code and downloadable files.</p>
<div class="postButtons">
<div class="double"><a class="demo" href="http://webdesignandsuch.com/posts/css-popup/css-popup.html">Demo</a><a class="download" href="http://webdesignandsuch.com/posts/css-popup/css-popup.zip">Download</a></div>
</div>
<p>If you check out the source code of the html file, you&#8217;ll see the following in the body. The &#8220;<strong>blanket</strong>&#8221; is the effect of putting the transparent black background behind the popup, which helps separate it from the rest of the content on the page. The &#8220;<strong>popUpDiv</strong>&#8221; is where you put the content of your popup.</p>
<pre class="brush: xml; title: ; notranslate">&lt;div id=&quot;blanket&quot; style=&quot;display:none&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;popUpDiv&quot; style=&quot;display:none&quot;&gt;

&lt;a href=&quot;#&quot; onclick=&quot;popup('popUpDiv')&quot; &gt;Click to Close CSS Pop Up&lt;/a&gt;
&lt;/div&gt;
&lt;a href=&quot;#&quot; onclick=&quot;popup('popUpDiv')&quot;&gt;Click to Open CSS Pop Up&lt;/a&gt;</pre>
<p>If you want the popup to load on <strong>page load</strong>, put the following in your body tag.</p>
<pre class="brush: xml; title: ; notranslate">&lt;body   onload=&quot;popup('popUpDiv')&quot;&gt;</pre>
<p>Here is the CSS used to style the blanket effect and the popup div. You&#8217;ll see I turned the blanket effect off for Internet Explorer, since it doesn&#8217;t appear to support &#8220;opacity&#8221; (big surprise).</p>
<pre class="brush: css; title: ; notranslate">#blanket {
background-color:#111;
opacity: 0.65;
*background:none;
position:absolute;
z-index: 9001;
top:0px;
left:0px;
width:100%;
}

#popUpDiv {
position:absolute;
background:url(pop-back.jpg) no-repeat;
width:400px;
height:400px;
border:5px solid #000;
z-index: 9002;
}</pre>
<p>There is a Javacript file linked to the html file to make some of the magic happen. I&#8217;m going to make the demo files available so you can play with it and make your own. <strong>Enjoy!</strong></p>
<p>The popup automatically centers itself in the screen. To adjust this for your popup, open the javascript file. You&#8217;ll see numbers for the height and width: <strong>window_width=window_width/2-200;//200 is half popup&#8217;s width</strong></p>
<p>Change &#8220;200&#8243; so it&#8217;s half the width of yours; do the same for the line that declares the height.</p>
<p><strong>Credits:</strong><br />
<a href="http://www.pat-burt.com/web-development/how-to-do-a-css-popup-without-opening-a-new-window/" target="_blank">Script Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/how-to-create-a-popup-with-css-and-javascript/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Embed a Twitter Feed on your website with jQuery</title>
		<link>http://webdesignandsuch.com/embed-a-twitter-feed-on-your-website-with-jquery/</link>
		<comments>http://webdesignandsuch.com/embed-a-twitter-feed-on-your-website-with-jquery/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 22:17:34 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=612</guid>
		<description><![CDATA[In a previous post I showed possibly the easiest way to embed a Twitter feed on your website. This brought up a couple of questions from some users. 1. Can [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://webdesignandsuch.com/2009/11/how-to-embed-a-twitter-feed-on-your-website/">previous post</a> I showed possibly the easiest way to embed a Twitter feed on your website. This brought up a couple of questions from some users.</p>
<p><strong>1. Can you make a background behind individual Tweets?<br />
2. Can you put the date on it&#8217;s own separate line?</strong></p>
<p>As the case goes with a lot of things these days <em><strong>jQuery to the rescue</strong></em>! Check out the demo to see both of these things in action, and then continue reading to see how to accomplish these things with jQuery and download the source files.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/jQuery-twitter/">View Demo</a><span id="more-612"></span></p>
<p>The jQuery and CSS code to make this happen came from Chris over at CSS-Tricks. I slimmed down and edited it to make it work for me. Here is a zip of the files used for the demo so you can download and edit it as you want.</p>
<p><a class="download-link" href="http://webdesignandsuch.com/posts/jQuery-twitter/jQuery-twitter.zip">Download Files</a></p>
<p>You&#8217;ll see in the head of the index page the jQuery which makes it work. The line you need to change is the following:</p>
<div class="codeBox">
<strong>http://twitter.com/status/user_timeline/<span style="color:#09a1dc">ilz_</span>.json?<span style="color:#09a1dc">count=5</span>&#038;callback=?</strong></div>
<p>First replace the part I highlighted in Blue &#8220;ilz_&#8221; with your Twitter user name.<br/><br />
Next, replace &#8220;count=5&#8243; with the number of tweets you want to show up on your page.</p>
<p>Other than that, you should be able to style the rest of the text, links, etc. as long as you know basic CSS. <strong>Enjoy!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/embed-a-twitter-feed-on-your-website-with-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using Smooth Scroll with Page Anchors and Javascript</title>
		<link>http://webdesignandsuch.com/using-smooth-scroll-with-page-anchors-and-javascript/</link>
		<comments>http://webdesignandsuch.com/using-smooth-scroll-with-page-anchors-and-javascript/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 08:39:42 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=515</guid>
		<description><![CDATA[Using page anchors is a pretty basic web design technique. If you want to link to a certain part of a page you create an &#8220;Anchor&#8221; at that part of [...]]]></description>
			<content:encoded><![CDATA[<p>Using page anchors is a pretty basic web design technique. If you want to link to a certain part of a page you create an &#8220;Anchor&#8221; at that part of the page. This anchor is what you point your link at. You can link to an anchor on the current page, or to an anchor on a certain part of another page. Useful, but not all that exciting.</p>
<p>There is, however a quick way to make even the simple act of scrolling up and down a page more visually appealing. It&#8217;s called <strong>Smooth Scroll</strong>. Check out my demo to see this in action, and then keep reading to learn how to add Smooth Scroll to your website.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/smooth-scroll/">View Demo</a><br />
<span id="more-515"></span></p>
<p>So lets start with the basics. To add an anchor on your page add the following in the place that you want you page to scroll to.</p>
<div class="codeBox">&lt;a name=&#8221;bottom&#8221; id=&#8221;bottom&#8221;&gt;&lt;/a&gt;</div>
<p>Then to point your link at this anchor, use the following. (This is to point to an anchor on the same page as the link.)</p>
<div class="codeBox">&lt;p&gt;&lt;a href=&#8221;#bottom&#8221;&gt;Bottom of the page&lt;/a&gt;&lt;/p&gt;</div>
<p>In case you were wondering, the following is how to point at an anchor on a different page.</p>
<div class="codeBox">&lt;p&gt;&lt;a href=&#8221;pageName.html#bottom&#8221;&gt;Bottom of the page&lt;/a&gt;&lt;/p&gt;</div>
<p>All you need for the Javascript Smooth Scroll effect is to link to the JS file, it does everything else for you.</p>
<p><a class="download-link" href="http://webdesignandsuch.com/posts/smooth-scroll/df_smooth_scroll.zip">Dowload Smooth Scroll Javascript</a></p>
<p>You&#8217;ll see the zip has all original files for the Smooth Scroll. Now I give credit where it&#8217;s due, this entire zip is from <a href="http://www.dezinerfolio.com/" target="_blank">DezinerFolio</a>. Make sure you check those guys out for some great freebies and code.</p>
<p>To link to the Javascript file, put the following in your head.</p>
<div class="codeBox">&lt;script type=&#8221;text/javascript&#8221; src=&#8221;smooth.pack.js&#8221;&gt;&lt;/script&gt;</div>
<p>The javascript file is the only file in the zip that you need to use for the Smooth Scroll to work. Have fun, and if you want to an actual webpage that uses this effect, check out the <a href="http://beantowndesign.com/web-portfolio.html">website portfolio</a> of my website.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/using-smooth-scroll-with-page-anchors-and-javascript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to embed a Twitter Feed on your website</title>
		<link>http://webdesignandsuch.com/how-to-embed-a-twitter-feed-on-your-website/</link>
		<comments>http://webdesignandsuch.com/how-to-embed-a-twitter-feed-on-your-website/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 13:49:15 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=499</guid>
		<description><![CDATA[One great thing about Twitter is the ability to embed your recent Tweets onto other websites. It's a rather simple process, so check out my demo and then keep reading to learn how you can embed your Tweets on your page.]]></description>
			<content:encoded><![CDATA[<p>Lots of people use Twitter. Love it or hate it, <strong>it&#8217;s true</strong>. I follow other people in the design industry to see what they&#8217;re up to. I use <a href="http://twitter.com/ilz_" target="_blank">my Twitter page</a> to post updates on things in my life, mostly design related.</p>
<p>One of the great things about Twitter is that you rarely ever go to the actual site. You can use a program like Tweetie or TweetDeck to send all your Tweets. Another great thing is the ability to embed your recent Tweets onto other websites. It&#8217;s a rather simple process, so check out my demo and then keep reading to learn how you can embed your Tweets on your page.</p>
<div class="postButtons">
<div class="single"><a href="http://webdesignandsuch.com/posts/twitter-feed/embed-twitter-feed.html" class="demo">Embed twitter feed Demo</a></div>
</div>
<pre class="brush: jscript; title: ; notranslate"> &lt;script type=&quot;text/javascript&quot; src=&quot;http://twitter.com/javascripts/blogger.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;http://twitter.com/statuses/user_timeline/beantowndesign.json?callback=twitterCallback2&amp;count=3&quot;&gt;&lt;/script&gt;
</pre>
<p>Copy the above code and paste it right into your XHTML code on your webpage, (right in the body).</p>
<p>All you need to do is replace where I have &#8220;beantowndesign&#8221;. That is my Twitter user name, replace it with yours. The other thing you get to decide is how many of the most recent posts you want to show. Change the part where it says &#8220;count=1&#8243; to however many Tweets you want to show up. For example, in the demo I decided to show my last 3 Tweets.</p>
<p>So that&#8217;s all there is to it.. how you style the text, links, and surrounding environment for the feed is up to you and your creativity.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/how-to-embed-a-twitter-feed-on-your-website/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>How to load a random image on pageload ~ Javascript</title>
		<link>http://webdesignandsuch.com/how-to-load-a-random-image-on-pageload-javascript/</link>
		<comments>http://webdesignandsuch.com/how-to-load-a-random-image-on-pageload-javascript/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 10:27:10 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=386</guid>
		<description><![CDATA[On my portfolio website I have an About page, where I explain&#8230; who I am of course! So I have a picture of myself in the sidebar, but got the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Beantown Design" src="http://webdesignandsuch.com/imagesForPosts/me.jpg" alt="" width="560" height="332" /></p>
<p>On my portfolio website I have an <strong><a href="http://beantowndesign.com/about.html">About page</a></strong>, where I explain&#8230; who I am of course! So I have a picture of myself in the sidebar, but got the idea that it&#8217;d be nice to have the picture change randomly on page load. I looked around at a few different options. Some were Javascript, some were PHP. It wasn&#8217;t worth turning the page into a PHP page just for this effect, so I went with Javascript. There are a lot of different options, but here&#8217;s the one I went with.</p>
<p><span id="more-386"></span></p>
<p>I made a div to surround the image, with the class of &#8220;me-box&#8221;. I gave this div a border, so the images will all appear to have a border when they are loaded. Next comes the Javascript code. This is where you give the src to your images. This code is put right in the body of your page where you want the images to appear, not in he head tag. A quick little piece of code that got the job done exactly like I wanted!</p>
<p><a href="http://beantowndesign.com/about.html">See the random image loading in action.</a></p>
<div class="codeBox">
<pre class="brush: plain; title: ; notranslate">

&lt;script language=&quot;JavaScript&quot;&gt;
 function banner() { } ; b = new banner() ; n = 0
 b[n++]= &quot;&lt;img name=randimg src='images/me.jpg' &gt;&quot;
 b[n++]= &quot;&lt;img name=randimg src='images/me2.jpg' &gt;&quot;
 b[n++]= &quot;&lt;img name=randimg src='images/me4.jpg' &gt;&quot;
 b[n++]= &quot;&lt;img name=randimg src='images/me5.jpg' &gt;&quot;
 b[n++]= &quot;&lt;img name=randimg src='images/me6.jpg' &gt;&quot;
 b[n++]= &quot;&lt;img name=randimg src='images/me3.jpg' &gt;&quot;
 i=Math.floor(Math.random() * n) ;
 document.write( b[i] )
 &lt;/script&gt;
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/how-to-load-a-random-image-on-pageload-javascript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CSS stylesheet switcher ~ Javascript, Dreamweaver, Kaos</title>
		<link>http://webdesignandsuch.com/css-stylesheet-switcher-javascript-dreamweaver-kaos/</link>
		<comments>http://webdesignandsuch.com/css-stylesheet-switcher-javascript-dreamweaver-kaos/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 15:00:56 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=376</guid>
		<description><![CDATA[Here&#8217;s an interesting way to add a CSS stylesheet switcher to your website. I&#8217;ve used stylesheet switchers in the past, but this one is different. In the past I had [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interesting way to add a CSS stylesheet switcher to your website. I&#8217;ve used stylesheet switchers in the past, but this one is different. In the past I had a button to press, which in turn switched the stylesheet of the page. This one switches the sheet at a certain time of day, which I think is pretty cool. <a href="http://www.BeantownDesign.com">My website</a> uses clouds in the header, so it was just begging for me to make a &#8220;night&#8221; version of the header which would automatically switch on at night.</p>
<p><span id="more-376"></span></p>
<p>The first thing to get is the Dreamweaver plugin from the guys over at Kaosweaver. <a href="http://www.kaosweaver.com/extensions/details.php?id=46">Here&#8217;s the link to the plugin.</a> Once you download and install that, open up Dreamweaver and the page you want to apply the style switcher to. Under <strong>Commands</strong>, you&#8217;ll see <strong>Style Switcher Lite</strong>.</p>
<p><img class="frame" title="CSS switcher" src="http://webdesignandsuch.com/imagesForPosts/bean/style-switcher.jpg" alt="" width="500" height="317" /></p>
<p>Click on that and this little box pops up.</p>
<p><img class="alignnone" title="CSS switcher" src="http://webdesignandsuch.com/imagesForPosts/bean/css-switcher.jpg" alt="" width="548" height="243" /></p>
<p>This is where you set your day and night stylesheets, and set what time of day you want the sweets to switch. What you do in the stylesheets is up to you. You can change colors, background-images, the options are endless. For the effect I wanted, I changed the background images of two things.. the clouds and the buildings (Boston skyline), which floats in front of the clouds.</p>
<p>So there you have it, here are the two versions that you&#8217;ll see at <a href="http://www.BeantownDesign.com">BeantownDesign.com</a>, depending on what time you&#8217;re looking at the website.</p>
<p><img class="alignnone" title="Beantown Design" src="http://webdesignandsuch.com/imagesForPosts/bean/day.jpg" alt="" width="560" height="161" /></p>
<p><img class="alignnone" title="Beantown Design" src="http://webdesignandsuch.com/imagesForPosts/bean/night.jpg" alt="" width="560" height="161" /></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/css-stylesheet-switcher-javascript-dreamweaver-kaos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add Current Date to webpage with Javascipt</title>
		<link>http://webdesignandsuch.com/how-to-add-the-current-date-to-your-webpage-with-javascipt/</link>
		<comments>http://webdesignandsuch.com/how-to-add-the-current-date-to-your-webpage-with-javascipt/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 14:11:13 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=249</guid>
		<description><![CDATA[The other day I was cutting and coding a website for a bank. One feature that was in the header was the current date, which would update daily (duh). I [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was cutting and coding a website for a bank. One feature that was in the header was the current date, which would update daily <em>(duh)</em>. I know in a previous project I had done this with Javascipt, so I back-tracked and got the code I used before. Here is the code, which will print the date on your web page in the following format: <br /><strong>July 18, 2009</strong></p>
<p>The first step is to link your XHTML page to the external Javascript page, which has the code which will make it all happen. Paste the code below in the Head of your page.</p>
<h3>Link to external Javascript File</h3>
<div class="codeBox">
<pre id="line17">&lt;<span>script</span><span> type</span>=<span>"text/javascript" </span><span>src</span>=<span>"js/date.js"</span>&gt;&lt;/<span>script</span>&gt;</pre>
</div>
<p><span id="more-249"></span></p>
<p>Next up is the make this Javascript page that you just linked to. Paste the following code inside a new javascipt page, and save it as &#8220;date.js&#8221; inside your &#8220;js&#8221; folder. You can of course use different names, just make sure you link them up correctly.</p>
<h3>Here is the code for your Javascript File</h3>
<div class="codeBox">
<pre>// JavaScript Document

//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May",
"June","July","August","September","October","November",
"December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", "
+ d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</div>


<p style="margin-top:15px">The last step is the put the following code in your XHTML file where you want the date to be written. The id="date" that you see is for the CSS styling of this text. You can rename or remove it if you are styling it differently.
<h3>Paste this inside your XHTML file</h3>
<div class="codeBox">
<pre id="line90"> &lt;<span>p</span><span> id</span>=<span>"date"</span>&gt;
&lt;<span>script</span><span> language</span>=<span>"JavaScript" </span><span>type</span>=<span>"text/javascript" </span>&gt;
document.write(TODAY);&lt;/<span>script</span>&gt;&lt;/<span>p</span>&gt;</pre>
</pre>
</div>
<p></p>
<p>So there it is. <br /><a href="http://webdesignandsuch.com/current-date-js/" target="_blank">You can view a live example here.</a> </p>
<p>I also packed this up into a zip so you can download and have all the files; including the XHTML, CSS, and JS. <br /><a href="http://webdesignandsuch.com/current-date-js/current-date-js.zip">Download the zip here.</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/how-to-add-the-current-date-to-your-webpage-with-javascipt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

