<?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>Not Just a Hat Rack &#187; (X)HTML</title>
	<atom:link href="http://notjustahatrack.com/posts/category/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://notjustahatrack.com</link>
	<description>Development, design, etc.</description>
	<lastBuildDate>Mon, 18 Apr 2011 16:05:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Must-Read HTML5 Articles</title>
		<link>http://notjustahatrack.com/posts/must-read-html5-articles/</link>
		<comments>http://notjustahatrack.com/posts/must-read-html5-articles/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 23:14:58 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[Must-Read/Reference]]></category>

		<guid isPermaLink="false">http://notjustahatrack.com/?p=105</guid>
		<description><![CDATA[An Introduction HTML 5 differences from HTML 4 from the W3C. Fantastic summary of the stuff that HTML5 will eventually bring to the table. Take it with a grain of salt though&#8230; because as you&#8217;ll see, there isn&#8217;t a whole lot you can use right now, cross-browser, without hacks. I mentioned the Misunderstanding Markup comic [...]]]></description>
			<content:encoded><![CDATA[<h3>An Introduction</h3>
<p><a href="http://www.w3.org/TR/2008/WD-html5-diff-20080122/">HTML 5 differences from HTML 4</a> from the W3C.  Fantastic summary of the stuff that HTML5 will eventually bring to the table.  Take it with a grain of salt though&#8230; because as you&#8217;ll see, there isn&#8217;t a whole lot you can use right now, cross-browser, without hacks.</p>
<p>I mentioned the <a href="http://www.manakor.org/xhtml/what-markup-language-to-use-now-xhtml-2-or-html-5/">Misunderstanding Markup comic</a> already, but definitely worth a read if you are still confused as to which markup syntax to employ.</p>
<p>Questions?  Check the <a href="http://wiki.whatwg.org/wiki/FAQ">WHATWG HTML5 FAQ</a>.</p>
<p><span id="more-105"></span></p>
<h3>Keeping up with the Spec</h3>
<p><a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28HTML_5%29">Comparison of layout engines (HTML 5)</a> on Wikipedia.  As you can see, Internet Explorer doesn&#8217;t provide a whole lot of support for HTML5 features.</p>
<p>The <a href="http://dev.w3.org/html5/spec/Overview.html">spec itself</a> is definitely worth a read.  Or use the  <a href="http://whatwg.org/html5">WHATWG version</a> (it&#8217;s split into multiple pages, and updated more regularly).  Obviously the most comprehensive source you&#8217;ll find.</p>
<h3>Current Uses</h3>
<p><a href="http://html5doctor.com/">HTML5 Doctor</a> has some articles on things that are mostly cross-browser, and more or less safe to use now, like <a href="http://html5doctor.com/native-drag-and-drop/">Native Drag and Drop</a> and <a href="http://html5doctor.com/block-level-links-in-html-5/">“Block-level” links</a>.  Unfortunately I can&#8217;t recommend utilizing much more of the tips on the HTML5 Doctor site, because they either rely on hacks, or could change as the HTML5 standard changes.</p>
<p>I can&#8217;t recommend using the new semantic elements from HTML5 yet, but it can&#8217;t hurt to begin <a href="http://jontangerine.com/log/2008/03/preparing-for-html5-with-semantic-class-names">preparing for HTML5 with semantic class names</a>.  If nothing else, you&#8217;ll be ready when the new elements become safe to use.</p>
<h3>We Can Dream&#8230;</h3>
<p><a href="http://www.brucelawson.co.uk/tests/html5-forms-demo.html">Automatic form validation</a>?  Yes please.</p>
<p>You can do <a href="http://9elements.com/io/projects/html5/canvas/">really cool things with the canvas element</a> apparently.</p>
<p>Web workers + video + canvas = <a href="http://htmlfive.appspot.com/static/tracker1.html">pretty freaking cool</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://notjustahatrack.com/posts/must-read-html5-articles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use the HTML5 Doctype</title>
		<link>http://notjustahatrack.com/posts/use-the-html5-doctype/</link>
		<comments>http://notjustahatrack.com/posts/use-the-html5-doctype/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 20:36:54 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[(X)HTML]]></category>

		<guid isPermaLink="false">http://notjustahatrack.com/?p=93</guid>
		<description><![CDATA[Yes, that&#8217;s right, you can use the HTML5 Doctype (&#60;!DOCTYPE html&#62;) now, if you want to. It&#8217;s certainly not necessary, but there&#8217;s several good arguments for implementing it sooner rather than later, and not many arguments against it. First things first, check out the incredibly insightful Misunderstanding Markup comic written by Jeremy Keith. Jeremy explains [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that&#8217;s right, you can use the HTML5 Doctype (<code>&lt;!DOCTYPE html&gt;</code>) now, if you want to.  It&#8217;s certainly not necessary, but there&#8217;s several good arguments for implementing it sooner rather than later, and not many arguments against it.  First things first, check out the incredibly insightful <a href="http://www.manakor.org/xhtml/what-markup-language-to-use-now-xhtml-2-or-html-5/">Misunderstanding Markup comic</a> written by Jeremy Keith.  Jeremy explains the differences between XHTML 1 and 2, and HTML, and boils down the &#8220;which doctype to use&#8221; argument to personal preference.  So what are the reasons, if any, not to use HTML5?</p>
<p><span id="more-93"></span></p>
<p>There&#8217;s a good summary in a <a href="http://stackoverflow.com/questions/5629/any-reason-not-to-start-using-the-html-5-doctype">Stack Overflow question</a> about using the HTML5 doctype:</p>
<blockquote>
<p>Well consider this:</p>
<p>When serving as text/html, all you need a doctype for is to trigger standards mode. Beyond that, the doctype does nothing as far as browsers are concerned.</p>
<p>When serving as text/html, whether you use XHTML markup or HTML markup, it&#8217;s treated by browsers as HTML.</p>
<p>So, really it comes down to using the shortest doctype that triggers standards mode (&lt;!DOCTYPE html&gt;) and using HTML markup that produces the correct result in browsers.</p>
<p>The rest is about conforming, validation and markup prerference.</p>
<p>With that said, using &lt;!DOCTYPE html&gt; now and trying to make your markup conform to HTML5 is not a bad idea as long as you stick to stable features that work in browsers now. You wouldn&#8217;t use anything in HTML4 or XHTML 1.x that doesn&#8217;t work in browsers, would you?</p>
<p>In other words, you use &lt;!DOCTYPE html&gt; with HTML4-like markup while honoring things that have been clarified in HTML5. HTML5 is about browser compatibility after all.</p>
<p>The downside to using HTML5 now is that the spec can change quite often. This makes it important for you to keep up with the spec as it actively changes. Also http://validator.nu/ might not always be up-to-date, but http://validator.w3.org/ isn&#8217;t always up-to-date either, so don&#8217;t let that stop you.</p>
<p>Of course, if you want to use XHTML 1.0 markup and conform to XHTML 1.0, then you shouldn&#8217;t use &lt;!DOCTYPE html&gt;.</p>
<p>Personally, I always use &lt;!DOCTYPE html&gt; for HTML.</p>
</blockquote>
<p>So there&#8217;s a slight chance you could have a problem validating your markup.  And there&#8217;s a very slight chance that a change to the HTML5 standard will result in a different doctype.  But mainly it comes down to personal preference.  If you want to write XHTML syntax <em>and</em> have it validate against an XHTML DTD, then you would have to use an XHTML doctype.</p>
<p>Personally, I like XHTML syntax.  I use self-closing tags, always write in lowercase, and use quoted attributes.  But when I validate my markup, I&#8217;m mainly looking to correct issues that would break the document display.  I dislike some of the more unnecessarily strict validation rules, like including a &#8220;type&#8221; attribute on script tags, and putting inputs inside block level elements.  HTML5 offers the best of both worlds, allowing you to write XHTML syntax (which mainly means self-closing tags), while not requiring as many crazy rules.  So why not have the option?</p>
<p>The other big advantage of using the HTML5 doctype now, is that it allows you to implement some of the HTML5 components that are currently supported cross-browser.  You can use <a href="http://html5doctor.com/native-drag-and-drop/">native drag and drop</a>, <a href="http://html5doctor.com/block-level-links-in-html-5/">&#8220;block-level&#8221; links</a>, and the new, more semantic elements with an HTML5 doctype now, but not with the XHTML doctype.</p>
<p>So I guess if you really want your markup to validate as XHTML, you can use the XHTML doctype.  But otherwise, use the HTML5 doctype, and look forward to browser adoption of some of the cooler HTML features!</p>
]]></content:encoded>
			<wfw:commentRss>http://notjustahatrack.com/posts/use-the-html5-doctype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benefits of CSS Sprites</title>
		<link>http://notjustahatrack.com/posts/benefits-of-css-sprites/</link>
		<comments>http://notjustahatrack.com/posts/benefits-of-css-sprites/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 19:55:24 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://notjustahatrack.com/?p=29</guid>
		<description><![CDATA[I haven&#8217;t used CSS Sprites a lot in the past, but when I finally started to, the benefits were immediately visible. I won&#8217;t go into detail about how to use this technique as it&#8217;s been covered in detail. I will, however, try to elaborate on just how much of a benefit CSS Sprites can offer. [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t used <a href="http://www.alistapart.com/articles/sprites">CSS Sprites</a> a lot in the past, but when I finally started to, the benefits were immediately visible.  I won&#8217;t go into detail about how to use this technique as it&#8217;s been <a href="http://www.google.com/search?q=css+sprites">covered in detail</a>.  I will, however, try to elaborate on just how much of a benefit CSS Sprites can offer.<span id="more-29"></span></p>
<h3>Page Load Speed</h3>
<p>The first immediately noticeable benefit of CSS Sprite usage is the faster loading time of your page.  It may seem counterintuitive, because you would think that the alternative (having many smaller images vs. sometimes extra images for Sprites) would be smaller in total size, but that&#8217;s not true.  There&#8217;s a small amount of extra information in each individual image you use on your site, so depending on the number of images you may end up actually loading less when all is said and done.</p>
<p>Also, one of Yahoo&#8217;s best practices for reducing page load time is to <a href="http://developer.yahoo.com/performance/rules.html#num_http">minimize HTTP requests</a>.  Using the Sprites technique does just that, reduces HTTP requests by combining images in a single file.  CSS Sprites are specifically mentioned in the same Yahoo article as a method to reduce image requests.</p>
<h3>Accessibility</h3>
<p>Depending on your alternative technique, using CSS Sprites could greatly increase the accessibility of your pages.  Let&#8217;s assume we have the following navigation:</p>
<p><img class="example" src="/lib/images/example-navigation.jpg" alt="Navigation Example" /></p>
<p>&#8230;and we want each element to light up on hover:</p>
<p><img class="example" src="/lib/images/example-navigation-on.jpg" alt="Navigation Example" /></p>
<p>You could use individual images for each navigation element, and then switch them out with the latter treatment using JavaScript on hover.  Your HTML would look something like this:</p>
<pre><code>
...
&lt;img src=&quot;nav2.jpg&quot; onmouseover=&quot;changeMe(this);&quot; /&gt;
&lt;img src=&quot;nav3.jpg&quot; onmouseover=&quot;changeMe(this);&quot; /&gt;
&lt;img src=&quot;nav4.jpg&quot; onmouseover=&quot;changeMe(this);&quot; /&gt;
...
</code></pre>
<p>But what happens if a user&#8217;s browser doesn&#8217;t support JavaScript?  Or CSS?  Or images?  Using CSS Sprites, your HTML code could look like this:</p>
<pre><code>
&lt;ul id=&quot;navigation&quot;&gt;
	&lt;li id=&quot;nav1&quot;&gt;&lt;a href=&quot;nav1.html&quot;&gt;Nav 1&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;nav2&quot;&gt;&lt;a href=&quot;nav2.html&quot;&gt;Nav 2&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;nav3&quot;&gt;&lt;a href=&quot;nav3.html&quot;&gt;Nav 3&lt;/a&gt;&lt;/li&gt;
	...
</code></pre>
<p>&#8230;which would degrade much better in older or alternate browsers.</p>
<h3>Time</h3>
<p>CSS Sprites are easier than the alternative.  Slicing up and dealing with multiple images is time-consuming, as is any necessary JavaScript image manipulation.  Plus, there are even several tools that will generate Sprites for you:</p>
<ul>
<li><a href="http://spritegen.website-performance.org/">Website Performance CSS Sprite Generator</a></li>
<li><a href="http://www.csssprites.com/">CSS Sprites Generator</a></li>
<li><a href="http://smartsprites.osinski.name/">SmartSprites</a></li>
</ul>
<p>And these are just some of the benefits of this technique.  If you haven&#8217;t at least tried working with CSS Sprites I highly recommend it.</p>
]]></content:encoded>
			<wfw:commentRss>http://notjustahatrack.com/posts/benefits-of-css-sprites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-Domain AJAX with DOMAssistant</title>
		<link>http://notjustahatrack.com/posts/cross-domain-ajax-with-domassistant/</link>
		<comments>http://notjustahatrack.com/posts/cross-domain-ajax-with-domassistant/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 19:37:20 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://notjustahatrack.com/?p=28</guid>
		<description><![CDATA[In a previous post I mentioned that I would revisit cross-domain AJAX calls to measure the helpfulness of JavaScript frameworks like DOMAssistant and Prototype. In this post I&#8217;ll use DOMAssistant to perform the same basic tests I did previously, while evaluating the potential increase in efficiency. Creating a XMLHttp Object The first thing you&#8217;ll notice [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="/posts/cross-domain-ajax-without-javascript-frameworks/">previous post</a> I mentioned that I would revisit cross-domain AJAX calls to measure the helpfulness of JavaScript frameworks like <a href="http://www.domassistant.com/">DOMAssistant</a> and <a href="http://www.prototypejs.org/">Prototype</a>.  In this post I&#8217;ll use DOMAssistant to perform the same basic tests I did previously, while evaluating the potential increase in efficiency.<span id="more-28"></span></p>
<h3>Creating a <code>XMLHttp</code> Object</h3>
<p>The first thing you&#8217;ll notice when using the aid of a JavaScript framework AJAX library is that you don&#8217;t have to bother creating a <code>XMLHttp</code> object.  That means right off the bat you&#8217;ll save yourself some (often painful) cross-browser scripting.  You can also be assured that any future improvements to this object implementation will be delivered to your code as long as you keep the framework updated.  Thank you JavaScript frameworks!</p>
<h3>Setting Up and Sending the Request</h3>
<p>Here&#8217;s the code I wrote earlier to perform both get and post requests without the help of a framework:</p>
<pre><code>
// Create and send an XMLHttp request
function doRequest(url, postVars) {
	// Get the request object (see previous function)
	req = getReqObject()
	// Make sure we have a XMLHttp object created
	if (req) {
		// If it's a post, we have to create and send the request slightly differently.
		if (postVars) {
			req.open('POST', url, true);
			req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			req.send(postVars);
		} else {
			req.open('GET', url, true);
			req.send(null);
		}
		// Set the function that handles the results
		req.onreadystatechange = function () { displayContents(req) };
	}
}

// Request via GET
doRequest('test.php?var=1', null);

// Request via POST
doRequest('test.php', 'var=1');
</code></pre>
<p>With DOMAssistant, you have to decide before your call what you are going to do with the data.  For simple calls where you just need to return the text, you can use the library&#8217;s <code>get</code> or <code>post</code> methods:</p>
<pre><code>
// Request via GET
DOMAssistant.AJAX.get('test.php?var=1', displayContents);

// Request via POST
DOMAssistant.AJAX.post('test.php?var=1', displayContents);
</code></pre>
<p>However, if you need an XML result that you can parse (like in our working example), you&#8217;ll need to make more complex calls:</p>
<pre><code>
// Create and send an XMLHttp request
function doRequest(url, postVars) {
	// If it's a post, we have to create and send the request slightly differently.
	if (postVars) {
		DOMAssistant.AJAX.ajax({
			url: url,
			method: "POST",
			params : postVars,
			callback: displayContents,
			responseType: "xml",
			headers : {
				"Content-type" : "application/x-www-form-urlencoded"
			}
		});
	} else {
		DOMAssistant.AJAX.ajax({
			url: url,
			method: "GET,
			callback: displayContents,
			responseType: "xml"
		});
	}
	// Set the function that handles the results
	req.onreadystatechange = function () { displayContents(req) };
}

// Request via GET
doRequest('test.php?var=1', null);

// Request via POST
doRequest('test.php', 'var=1');
</code></pre>
<p>As you can see, if you need an XML document for additional post-processing, you&#8217;ll end up with almost as much code with DOMAssistant!</p>
<h3>Handling the Result</h3>
<p>Here&#8217;s the function I wrote to alert specific data from the response content:</p>
<pre><code>
// Display resulting content from req
function displayContents(req) {
	// Only do something when the request is done
	if (req.readyState == 4) {
		// Make sure it was a success
		if (req.status == 200) {
			// Traverse the resulting XML, alerting titles of items
			var xml = req.responseXML;
			var items = xml.getElementsByTagName("item");
			for (var i = 0; i &lt; items.length; i++) {
				alert(items[i].getElementsByTagName('title').item(0).firstChild.nodeValue);
			}
		} else {
			alert('Problem with the request.');
		}
	}
}
</code></pre>
<p>An odd thing about DOMAssistant is that your specified callback function is hardcoded in the framework to be executed after the request is complete.  This means you won&#8217;t be able to troubleshoot based on the ready state of the request.  I also found that the callback function doesn&#8217;t have access to the status of the completed request, meaning you won&#8217;t know if your request was successful or not.  I&#8217;m sure there were logical reasons by the developers for this, but in the meantime all you can do is work with the response text.</p>
<p>If you used the <code>get</code> or <code>post</code> methods, you&#8217;ll be provided the text of the response:</p>
<pre><code>
// Display resulting content from responseText
function displayContents(rText) {
	alert(rText);
}
</code></pre>
<p>For our example, we needed an XML document, and as such we need to loop through and extract the information in much the same manner as we did before:</p>
<pre><code>
// Display resulting content from req
function displayContents(rXML) {
	var items = rXML.getElementsByTagName("item");
	for (var i = 0; i &lt; items.length; i++) {
		alert(items[i].getElementsByTagName('title').item(0).firstChild.nodeValue);
	}
}
</code></pre>
<p>As you can see there really isn&#8217;t <em>any</em> difference here except that DOMAssistant actually limits our troubleshooting capabilities.</p>
<h3>Cross-Domain Requests</h3>
<p>JavaScript frameworks don&#8217;t provide a built-in solution for addressing cross-domain request security issues.  In fact, the Prototype documentation makes this extremely prominent at the top of their documentation:</p>
<blockquote><p>
Remember that for security reasons (that is preventing cross-site scripting attacks) Ajax requests can only be made to URLs of the same protocol, host and port of the page containing the Ajax request. Some browsers might allow arbitrary URLs, but you shouldn&#8217;t rely on support for this.
</p></blockquote>
<h3>Conclusion</h3>
<p>All in all I&#8217;m rather disappointed with DOMAssistant&#8217;s AJAX library.  For very simple tasks like grabbing, posting and printing text it works great.  But for complicated cases, it offers little to no benefit.  It could be effective if used in conjunction with a more complex server-side proxy, so that the proxy could handle parsing and the DOMAssistant would just have to retrieve and display text.  Next time I&#8217;ll take a look at Prototype, and see if it offers more flexible and comprehensive functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://notjustahatrack.com/posts/cross-domain-ajax-with-domassistant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Color Selector Script</title>
		<link>http://notjustahatrack.com/posts/simple-color-selector-script/</link>
		<comments>http://notjustahatrack.com/posts/simple-color-selector-script/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 18:20:11 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://notjustahatrack.com/?p=25</guid>
		<description><![CDATA[Recently I was tasked with creating a form that allowed the user to specify a color selection from a limited number of options. There are numerous scripts that display a popup color selection on the web, but I needed one that was limited to just a few colors. So I wrote a script that makes [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was tasked with creating a form that allowed the user to specify a color selection from a limited number of options.  There are <a href="http://www.google.com/search?q=colorpicker">numerous scripts that display a popup color selection</a> on the web, but I needed one that was limited to just a few colors.  So I wrote a script that makes all text inputs in a form with the class name of &#8220;color&#8221; display a simple color selection box.  Here&#8217;s what it looks like in action:<span id="more-25"></span></p>
<form name="testForm" action="test.php">
<input type="text" class="color" />
<input type="text" class="color" />
<input type="text" class="color" />
</form>
<link rel="stylesheet" href="/lib/styles/colorPicker.css" type="text/css" media="screen" />
<p><script type="text/javascript" src="/lib/js/colorPicker.js"></script></p>
<h3>Implementation</h3>
<p>Download and store the JavaScript and CSS:</p>
<p><a class="compressed" href="/lib/scripts/colorPicker.zip">Simple Color Selector (.zip)</a><br />
<a class="compressed" href="/lib/scripts/colorPicker.tar.gz">Simple Color Selector (.tar.gz)</a></p>
<p>Then add the following references to your page:</p>
<pre><code>
&lt;link rel=&quot;stylesheet&quot; href=&quot;/lib/styles/colorPicker.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/lib/js/colorPicker.js&quot;&gt;&lt;/script&gt;
</code></pre>
<h3>Usage</h3>
<p>The script creates the color table and assigns click events dynamically, so all you have to do is include the word &#8220;color&#8221; in text input classes like so:</p>
<pre><code>
&lt;input type=&quot;text&quot; class=&quot;color&quot; /&gt;
</code></pre>
<p>By default, the script displays the following colors: White (blank), black, grey, red, yellow, and blue.  You can easily replace the default colors by adding the following after you reference the main JavaScript file:</p>
<pre><code>
&lt;script type=&quot;text/javascript&quot;&gt;
	colorPicker.colors = new Array('', 'black', 'gray', 'red', 'yellow', 'blue', 'teal');
&lt;/script&gt;
</code></pre>
<p>And that&#8217;s it!  The user&#8217;s selection will be hidden within the text inputs, so upon submission you&#8217;ll be able to work with the resulting data.  Feel free to modify functionality within the JavaScript file, or style within the CSS file.</p>
]]></content:encoded>
			<wfw:commentRss>http://notjustahatrack.com/posts/simple-color-selector-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

