<?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>Joe Stevens&#039; Blog &#187; JavaScript</title>
	<atom:link href="http://www.joe-stevens.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joe-stevens.com</link>
	<description>Everything .NET and C#</description>
	<lastBuildDate>Sat, 24 Jul 2010 00:23:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to convert a JSON date serialized by an ASMX web service to a JavaScript Date object</title>
		<link>http://www.joe-stevens.com/2010/06/29/how-to-convert-a-json-date-serialized-by-an-asmx-web-service-to-a-javascript-date-object/</link>
		<comments>http://www.joe-stevens.com/2010/06/29/how-to-convert-a-json-date-serialized-by-an-asmx-web-service-to-a-javascript-date-object/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 03:36:42 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ASMX]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=494</guid>
		<description><![CDATA[JSON doesn&#8217;t have a standard way to represent a date. You can read about the reasons behind this here.
If you are using an ASMX web service returning JSON then you&#8217;ll find it serializes the DateTime object to a string that looks like this:
/Date(1278943200000)/
The numer in this string is the number of milliseconds since January 1st [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/06/29/how-to-convert-a-json-date-serialized-by-an-asmx-web-service-to-a-javascript-date-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Populate a select dropdown list using jQuery and Ajax</title>
		<link>http://www.joe-stevens.com/2010/02/23/populate-a-select-dropdown-list-using-jquery-and-ajax/</link>
		<comments>http://www.joe-stevens.com/2010/02/23/populate-a-select-dropdown-list-using-jquery-and-ajax/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 02:49:36 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=459</guid>
		<description><![CDATA[In this post I&#8217;ll explain how to populate a select dropdownlist using jQuery and Ajax.  I am using an ASP.NET web application and page methods to perform the Ajax calls.  Using page methods means that you do not need a seperate web service, which is good if the functionality is specifically for the page.  The [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/23/populate-a-select-dropdown-list-using-jquery-and-ajax/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Convert all static text email addresses to mailto links using jQuery</title>
		<link>http://www.joe-stevens.com/2010/02/18/convert-all-static-text-email-addresses-to-mailto-links-using-jquery/</link>
		<comments>http://www.joe-stevens.com/2010/02/18/convert-all-static-text-email-addresses-to-mailto-links-using-jquery/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:02:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Regular Expression]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=452</guid>
		<description><![CDATA[In this post I&#8217;ll show how to use  jQuery to automatically convert all email addesses from static text into a mailto link.

Consider the following table which contains a person&#8217;s details including their email address.

Using jQuery I can easily find table cells that contain an email address by using a regular expression and then convert the address [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/18/convert-all-static-text-email-addresses-to-mailto-links-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force client-side JavaScript event to fire programatically using jQuery</title>
		<link>http://www.joe-stevens.com/2010/01/15/force-client-side-javascript-event-to-fire-programatically-using-jquery/</link>
		<comments>http://www.joe-stevens.com/2010/01/15/force-client-side-javascript-event-to-fire-programatically-using-jquery/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 05:57:33 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=396</guid>
		<description><![CDATA[Earlier today I needed to force a clide side event to fire programatically using jQuery.
I found you can do this easily with the jQuery trigger method:

$(&#34;#myControl&#34;).trigger(&#34;change&#34;);

The above will trigger the change event of the control with ID &#8216;myControl&#8217;
    ]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/15/force-client-side-javascript-event-to-fire-programatically-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit in place / inline editing with jQuery, jTemplates and ASP.NET</title>
		<link>http://www.joe-stevens.com/2010/01/12/edit-in-place-inline-editing-with-jquery-jtemplates-and-asp-net/</link>
		<comments>http://www.joe-stevens.com/2010/01/12/edit-in-place-inline-editing-with-jquery-jtemplates-and-asp-net/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 02:19:05 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=386</guid>
		<description><![CDATA[Download source
In this post I talked about how to use the jTemplates plugin for jQuery. Using my final example in the post I thought it would be cool to try and add some &#8216;edit in place&#8217; functionality to the table.
For this to work I&#8217;ve created a Data Access Layer using Linq to XML. My web [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/12/edit-in-place-inline-editing-with-jquery-jtemplates-and-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the jTemplate jquery plugin with ajax and ASP.NET</title>
		<link>http://www.joe-stevens.com/2010/01/05/using-the-jtemplate-jquery-plugin-with-ajax-and-asp-net/</link>
		<comments>http://www.joe-stevens.com/2010/01/05/using-the-jtemplate-jquery-plugin-with-ajax-and-asp-net/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 04:32:03 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[jtemplates]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=367</guid>
		<description><![CDATA[Download source
A guy in work introduced me to jTemplates, a template engine plugin for jQuery. It allows you to easily bind JavaScript objects to a defined template and also has some other nifty features.
I&#8217;ve found jTemplates to be particularly good when using ajax to display any information quickly and easily.
First I&#8217;ll explain how to create [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/05/using-the-jtemplate-jquery-plugin-with-ajax-and-asp-net/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using jQuery to make ajax calls to an ASMX web service using ASP.NET</title>
		<link>http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/</link>
		<comments>http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 06:02:45 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=351</guid>
		<description><![CDATA[Download source
Making ajax calls to an ASP.NET web service using jQuery is too easy.  In this post I&#8217;ll explain how to do it!

Start by creating a new web project and adding a new ASMX web service:

Open the new web service and uncomment the following line to allow the web service to be called from script.

[System.Web.Script.Services.ScriptService]

The web [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using jQuery&#8217;s Each method to iterate through a JavaScript array</title>
		<link>http://www.joe-stevens.com/2009/12/30/using-jquerys-each-method-to-iterate-through-a-javascript-array/</link>
		<comments>http://www.joe-stevens.com/2009/12/30/using-jquerys-each-method-to-iterate-through-a-javascript-array/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:26:45 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Each]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=345</guid>
		<description><![CDATA[The Each method in jQuery is pretty useful and can be used to iterate through the elements within a jQuery object.
I&#8217;ve been using it recently to iterate through JavaScript arrays.  It saves having to use a for loop and the code looks nicer.

Say I have the following code that creates an array and outputs the values [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/30/using-jquerys-each-method-to-iterate-through-a-javascript-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON Serialization using the DataContractJsonSerializer and C#</title>
		<link>http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/</link>
		<comments>http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 05:25:05 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[deserialization]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[serialization]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=336</guid>
		<description><![CDATA[Download source code
Previously I&#8217;d done JSON serialization using the JavaScriptSerializer which is part of AJAX Extensions 1.0, but this is now obsolete.
.NET 3.5 introduced the DataContractJsonSerializer class.  The class sits in the System.Runtime.Serialization.Json namespace which is curiously hidden away in the System.ServiceModel.Web assembly.
The DataContractJsonSerializer can serialize a class that contains the Serializable attribute or any [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript inline if statement</title>
		<link>http://www.joe-stevens.com/2009/12/29/javascript-inline-if-statement/</link>
		<comments>http://www.joe-stevens.com/2009/12/29/javascript-inline-if-statement/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 23:20:37 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[if statement]]></category>
		<category><![CDATA[inline]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=333</guid>
		<description><![CDATA[The JavaScript inline if statement is identical to the one in C#:

var forename = (gender == 'male') ? 'Joe' : 'Emily';

    ]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/29/javascript-inline-if-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Escape curly braces when using String.Format or StringBuilder.AppendFormat</title>
		<link>http://www.joe-stevens.com/2009/12/29/escape-curly-braces-when-using-string-format-or-stringbuilder-appendformat/</link>
		<comments>http://www.joe-stevens.com/2009/12/29/escape-curly-braces-when-using-string-format-or-stringbuilder-appendformat/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 22:44:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[stringbuilder]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=330</guid>
		<description><![CDATA[I was using the StringBuilder to create a JSON string which included an array and therefore curly braces, but I got an exception as curly braces are used to define the parameters for the format.

sb.AppendFormat(&#34;{\&#34;Forename\&#34;:\&#34;{0}\&#34;,\&#34;Surname\&#34;:\&#34;{1}\&#34;}&#34;, person.Forename, person.Surname);

At first I tried adding a backslash which is used to escape the quotation mark but this didn&#8217;t work, so I tried the double [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/29/escape-curly-braces-when-using-string-format-or-stringbuilder-appendformat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the CustomValidator&#8217;s ClientValidationFunction</title>
		<link>http://www.joe-stevens.com/2009/08/12/using-the-customvalidators-clientvalidationfunction/</link>
		<comments>http://www.joe-stevens.com/2009/08/12/using-the-customvalidators-clientvalidationfunction/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 04:02:31 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[clientvalidationfunction]]></category>
		<category><![CDATA[customvalidator]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=217</guid>
		<description><![CDATA[The ASP.NET CustomValidator allows you to create custom validation that fits into its validation framework.  The CustomValidator has a server side event called OnServerValidate and a client side event called ClientValidationFunction.
You can use the CustomValidator by just implementing the OnServerValidate event, but any other validation controls that are validated client side will need to be [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/08/12/using-the-customvalidators-clientvalidationfunction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show a JavaScript confirm dialog box after client validation</title>
		<link>http://www.joe-stevens.com/2009/08/12/show-a-javascript-confirm-dialog-box-after-client-validation/</link>
		<comments>http://www.joe-stevens.com/2009/08/12/show-a-javascript-confirm-dialog-box-after-client-validation/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 03:27:00 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[confirm]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=210</guid>
		<description><![CDATA[It&#8217;s quite common to use a JavaScript confirm dialog on a button press to ensure that the user wants to submit the page.  If you are using any of the ASP.NET validators that use client side validation you will find the confirm appears before the validation, whereas it would be better if the confirm box [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/08/12/show-a-javascript-confirm-dialog-box-after-client-validation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Show &#8216;Are you sure you want to navigate away from this page&#8217; message like Hotmail</title>
		<link>http://www.joe-stevens.com/2009/07/31/show-are-you-sure-you-want-to-navigate-away-from-this-page-message-like-hotmail/</link>
		<comments>http://www.joe-stevens.com/2009/07/31/show-are-you-sure-you-want-to-navigate-away-from-this-page-message-like-hotmail/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 04:50:58 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[hotmail]]></category>
		<category><![CDATA[onbeforeunload]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=185</guid>
		<description><![CDATA[If you start typing an email in Hotmail then navigate away without saving or sending it you get the following message:

This is done by using the onbeforeunload window event.  This event can be used to perform any processing needed before navigating to a new page, but if the event handler returns a string you get [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/31/show-are-you-sure-you-want-to-navigate-away-from-this-page-message-like-hotmail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable enter submitting form with JavaScript</title>
		<link>http://www.joe-stevens.com/2009/06/04/disable-enter-submitting-form-with-javascript/</link>
		<comments>http://www.joe-stevens.com/2009/06/04/disable-enter-submitting-form-with-javascript/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 04:07:18 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://joestevens.wordpress.com/?p=49</guid>
		<description><![CDATA[On a project I was working on I was asked to disable the enter key submitting the form.  Usually it would be better just to ensure that hitting enter performed the correct action but if you do want to disable this you can do so with JavaScript.
I created a JavaScript function called disableEnterSubmit which takes [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/06/04/disable-enter-submitting-form-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
