<?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>Jeremyopolis &#187; tutorials</title>
	<atom:link href="http://jrsandberg.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://jrsandberg.com</link>
	<description>An History Of Nerdly Activities</description>
	<lastBuildDate>Mon, 27 Sep 2010 02:57:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Windows Echo Without A Newline</title>
		<link>http://jrsandberg.com/2010/09/windows-echo-without-a-newline/</link>
		<comments>http://jrsandberg.com/2010/09/windows-echo-without-a-newline/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 02:57:58 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=155</guid>
		<description><![CDATA[Ever wanted to echo something in a cmd file and NOT have a newline added onto the end of the string?  Well, here is the answer: ECHO/&#124;SET /p=Text you want to be echo'ed here!]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to echo something in a cmd file and NOT have a newline added onto the end of the string?  Well, here is the answer:<br />
<code><br />
ECHO/|SET /p=Text you want to be echo'ed here!<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2010/09/windows-echo-without-a-newline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Date Picker</title>
		<link>http://jrsandberg.com/2009/07/javascript-date-picker/</link>
		<comments>http://jrsandberg.com/2009/07/javascript-date-picker/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 07:06:28 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=18</guid>
		<description><![CDATA[Well, I started trying to do a tutorial for one of these so long ago that I might as well just release the finished code. I am releasing it under the MIT license. The code can be found at http://jrsandberg.com/Calendar.txt The calendar works as an iframe. Include the calendar with something like this: &#60;iframe src="Calendar.html" [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I started trying to do a tutorial for one of these so long ago that I might as well just release the finished code.  I am releasing it under the MIT license.  The code can be found at <a href="http://jrsandberg.com/Calendar.txt" target="_blank">http://jrsandberg.com/Calendar.txt</a></p>
<p>The calendar works as an iframe.  Include the calendar with something like this:</p>
<pre>&lt;iframe src="Calendar.html" frameborder="0" width="100"
height="100" name="calendar" id="calendar"/&gt;</pre>
<p>Once the iframe is included, you will also need to add a global variable called &#8220;cal&#8221;.  Just to make the calendar behave nicely you might want to add a &#8220;cal.hideCal();&#8221; to the &lt;body onclick&gt; event.  The calendar will automatically attach itself to the parent window and provide you with the functions you need through the &#8220;cal&#8221; variable.</p>
<p>In order to use the date picker, simply create an input that has the type of text and add the appropriate functions to it:</p>
<pre>&lt;input type="text" name="startDate" id="startDate"
size="10" onclick="cal.popCal(this);"
onkeypress="cal.keyPress(this,event);"/&gt;</pre>
<p>That should be it.  The calendar should align itself with the text box and format the date and things according to the us standard.  The calendar isn&#8217;t an end all or a be all but I think it covers the general functionality really well.</p>
<p>Admittedly, I would rather have the calendar work through a div and not an iframe.  I also don&#8217;t like the fact that it uses a &#8220;hack&#8221; to attach itself to the parent window.  One other word of caution, I don&#8217;t know how well it works in IE.  I have only really used it on Ubuntu firefox 2.5+.</p>
<p>Anyway, if you add any features, find any bugs or use this calendar, I would appreciate any and all feedback you have, good or bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2009/07/javascript-date-picker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calendar v0.1 &#8211; A Dynamic Javascript Date Picker&#8230;Tutorial</title>
		<link>http://jrsandberg.com/2008/06/calendar-v01-a-dynamic-javascript-date-pickertutorial/</link>
		<comments>http://jrsandberg.com/2008/06/calendar-v01-a-dynamic-javascript-date-pickertutorial/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 04:25:55 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=6</guid>
		<description><![CDATA[This is the first of a few installments of how to create your own dynamic JavaScript calendar/date picker. First of all, I want to define what I mean be dynamic: simply put, the calendar creates itself from scratch so that it doesn&#8217;t matter what date the user wants to pick; they can find it. The [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of a few installments of how to create your own dynamic JavaScript calendar/date picker.  First of all, I want to define what I mean be dynamic: simply put, the calendar creates itself from scratch so that it doesn&#8217;t matter what date the user wants to pick; they can find it.</p>
<p>The first thing that I always do when creating a JavaScript application is to mock up the html.  I find it much easier to debug if I can actually see what is coming out of the JavaScript.  This is exactly what I will show you now.</p>
<p>My main concern at this point is that my JavaScript calendar will be robust enough to handle any user&#8217;s need.  This means considering how many weeks I needed to display to show all of the days.  At first thought, 5 seems like a good idea, and why not?  Most months consist of four weeks with a few days on either end.  But, alas, there are many cases where five weeks would just not do.  This means that my design includes six weeks with the first day of the month you are looking at, starting at the top week and the other days following.</p>
<p>The next thing I considered was how to display and manipulate this data.  My first idea, and I think best idea, is to just use a simple table.  I know, I know, I made reference to the dreaded html tag and even said that I used it, but the plain and simple task is that I do use it and so should you&#8230;when it makes sense.</p>
<p>With those two things in mind, I set off to compose some really ugly looking html.  Let&#8217;s begin by creating a table that has a border so we can see exactly where our columns and rows are divided.  That will look something like this:</p>
<pre>&lt;table border="1"&gt;</pre>
<p>Pretty simple!  The first thing I want the user to see is the name of the month with an arrow on either side so they can move from month to month.  That would look something like this:</p>
<pre>
&lt;tr&gt;
&lt;td&gt;&lt;&lt;&lt;/td&gt;
&lt;td colspan="5"&gt;May&lt;/td&gt;
&lt;td&gt;&gt;&gt;&lt;/td&gt;
&lt;/tr&gt;
</pre>
<p>The colspan=&#8221;5&#8243; is included because we know that there are 7 days in a week and the arrows only need to be one column wide.  This means that we want the name of the month to take up the rest of the columns which would be 5 columns. The next row will show each day of the week in the corresponding column assigned to it:</p>
<pre>&lt;tr&gt;
&lt;td&gt;S&lt;/td&gt;
&lt;td&gt;M&lt;/td&gt;
&lt;td&gt;T&lt;/td&gt;
&lt;td&gt;W&lt;/td&gt;
&lt;td&gt;T&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;S&lt;/td&gt;
&lt;/tr&gt;</pre>
<p>The final thing to do is simply list the days the correspond to the month.  The first few will of course be for the month before and the last few days for the month after.</p>
<pre>&lt;tr&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;</pre>
<p>And after all of that nice html code just finish it off with &lt;/table&gt; and the mock of up our date picker/calendar is complete.  Here is what the finished product should look like:</p>
<div style="text-align:center;">
<table border="1">
<tr>
<td><<</td>
<td colspan="5">May</td>
<td>>></td>
</tr>
<tr>
<td>S</td>
<td>M</td>
<td>T</td>
<td>W</td>
<td>T</td>
<td>F</td>
<td>S</td>
</tr>
<tr>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
</tr>
<tr>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
</tr>
<tr>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
</tr>
<tr>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td>31</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
</table>
</div>
<p>Not very pretty yet?  Doesn&#8217;t actually accomplish anything yet?  Um, yeah, that is correct.  This is only so that we have a base off of which we can go.  Now we easily know how we want to generate our html inside out javascript object.  Figuring out the basic html before hand is the best way I have found to build web applications.</p>
<p>In the next installment of this tutorial I will show how to create a JavaScript object, public and private methods and variables in that object as well as one way to generate html on the fly with JavaScript.  Thanks for joining me for this tutorial and I encourage you to check out the rest of the tutorials as they come.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2008/06/calendar-v01-a-dynamic-javascript-date-pickertutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

