<?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>gEt DoWn ToNiGhT &#187; html</title>
	<atom:link href="http://www.getdowntonight.co.uk/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.getdowntonight.co.uk</link>
	<description>amusingly digressive progressive discussions</description>
	<lastBuildDate>Mon, 05 Dec 2011 22:41:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Loading JSON data &#8211; the EASY way!</title>
		<link>http://www.getdowntonight.co.uk/2009/11/loading-json-data-the-easy-way/</link>
		<comments>http://www.getdowntonight.co.uk/2009/11/loading-json-data-the-easy-way/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:22:04 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=398</guid>
		<description><![CDATA[A few weeks ago I wrote a blog post about using jQuery and JSON to automatically load data from a JSON file in to name-matched controls on an HTML page. It is only now that I realise quite how powerful this is! The great thing about it is that you do not have to edit [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-403 colorbox-398" title="json160" src="http://www.getdowntonight.co.uk/wp-content/json160.gif" alt="json160" width="96" height="96" />A few weeks ago I wrote a blog post about using jQuery and JSON to automatically load data from a JSON file in to name-matched controls on an HTML page.</p>
<p><strong>It is only now that I realise quite how powerful this is!</strong></p>
<p>The great thing about it is that you do not have to edit your data-load function if you add a new field to the database. Because the jQuery function loops through all the fields in the JSON data, it will automatically insert the values in to the correct fields, providing those fields are named the same as the html form controls.</p>
<p>Here is the code again for those who dont want to check back.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/yourJson.js, function(myJson){
	$.each(myJson.rows, function(i,item) {
		 for (prop in item) {
		 	 $('#' + prop).val(item[prop]);
		 }
	});
});</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/11/loading-json-data-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

