<?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>Illuminati Karate, Inc. &#187; combo box</title>
	<atom:link href="http://illuminatikarate.com/blog/tag/combo-box/feed/" rel="self" type="application/rss+xml" />
	<link>http://illuminatikarate.com</link>
	<description>creative web design, development and marketing</description>
	<lastBuildDate>Wed, 16 May 2012 23:38:53 +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>10 Javascript Tricks for Better Forms</title>
		<link>http://illuminatikarate.com/blog/10-javascript-tricks-for-better-forms/</link>
		<comments>http://illuminatikarate.com/blog/10-javascript-tricks-for-better-forms/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 17:53:56 +0000</pubDate>
		<dc:creator>George Huger</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[combo box]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[progress bars]]></category>

		<guid isPermaLink="false">http://illuminatikarate.com/blog/?p=4</guid>
		<description><![CDATA[Nothing exposes the gap between web apps and desktop applications more than plain HTML forms. Fortunately, by leveraging Javascript we can start to close this gap while maintaining a consistent experience for users using screen readers and old browsers. We&#8217;ve identified 10 ways in which normal HTML forms fall [...]]]></description>
			<content:encoded><![CDATA[<p>Nothing exposes the gap between web apps and desktop applications more than plain HTML forms. Fortunately, by leveraging Javascript we can start to close this gap while maintaining a consistent experience for users using screen readers and old browsers.</p>
<p>We&#8217;ve identified 10 ways in which normal HTML forms fall short, and dug up the Javascript and CSS code you&#8217;ll need to fix them. Although the best enhancements are so intuitive as to be unnoticed, rest assured your visitors would thank you if they knew.</p>
<p class="note"><em>Note: Many of the solutions in this list depend on <a href="http://jquery.com">jQuery</a>, our javascript framework of choice.</em></p>
<p><span id="more-369"></span></p>
<h4>Combo Boxes</h4>
<p>For those unfamiliar, a Combo Box is a combination of a text box and a list box. It allows the user the option of selecting from a list of predefined items, or entering a new item of their choice. Your browser&#8217;s address bar is a perfect example.</p>
<p>Its an elegant solution to a common problem, yet the combo box was somehow left out of HTML&#8217;s form elements.</p>
<p>Enter <strong><a href="http://code.google.com/p/sexy-combo/">Sexy Combo</a></strong>, a jQuery plugin which provides a seamless solution. Users without javascript will simply encounter a normal select element.</p>
<h4>Progress Bars For Uploads</h4>
<p>The standard file input frustrates users with its awkwardness and lack of information. Furthermore, not being able to upload asynchronously results in a lot of wasted time.</p>
<p>To be fair, providing information on an ongoing upload is trickier than it might sound. Thankfully, <strong><a href="http://swfupload.org">SWFUpload</a></strong> provides a very clean solution that will convert your standard file inputs into a very flexible and asynchronous file uploader complete with a progress bar.</p>
<p class="note"><em>Note: As the name implies, SWFUpload uses an invisible Flash movie to actually perform the upload. As such, your users will need Flash as well as javascript enabled to take advantage.</em></p>
<h4>Date Selection</h4>
<p>Using a standard text input for a date leads to all manner of formatting issues, and using 3 select boxes is cumbersome. Desktop apps have a great solution &#8211; the date picker, which is to say a pop-up calendar.</p>
<p><a href="http://ui.jquery.com/demos/datepicker"><strong>jQuery UI&#8217;s Datepicker plugin</strong></a> is a perfect solution.</p>
<p class="note"><em>Note: The download page is for the entire jQuery UI library, but will allow you to download only what you want. I&#8217;d recommend only downloading the Datepicker with Packed compression, as the library is quite large.</em></p>
<h4>Time Selection</h4>
<p>Time selection in a normal HTML form has the same problems as date selection, but it lacks a uniform solution. We&#8217;ve provided 2 implementations, so that you can decide which is more appropriate for your audience.</p>
<p><strong><a href="http://keith-wood.name/timeEntry.html">Time Entry</a></strong> is a jQuery plugin that is simple and very customizable. Its normal behavior is to provide a text box where the user can use the arrow keys to quickly set the hour, minute, and am/pm settings. Its similar to how you set the time in Windows, so it should be intuitive for most visitors.</p>
<p><a href="http://www.oakcitygraphics.com/jquery/clockpick/trunk/ClockPick.cfm"><strong>ClockPick</strong></a> is a more creative, but less traditional solution. If you&#8217;re generally comfortable with creative inputs, its a fantastic interface.</p>
<h4>Color Selection</h4>
<p>Color selection might not apply to every app, but when you need it the native options leave you out in the cold. There&#8217;s only a handful of visitors who would know what a hex code is, and even fewer who have their favorites memorized.</p>
<p><a href="http://www.eyecon.ro/colorpicker/"><strong>ColorPicker</strong></a> is a very nice solution, which provides a color picker similar to that in Adobe Photoshop.</p>
<h4>Input Masking / Validation</h4>
<p>Input masking is when a text box has static characters already included, and the cursor moves intelligently. For example, a text box for a social security number should already have the dashes, and after you enter the first three numbers the cursor should move past the first dash. Furthermore, it shouldn&#8217;t allow anything but numbers to be entered.</p>
<p>Input validation is checking to see if the value the user entered falls within the boundaries. In our social security number example, if the number entered isn&#8217;t exactly 9 digits, its not valid.</p>
<p class="note"><em>Note: Client-side validation can be easily overridden by a malicious visitor, so you&#8217;ll need to sanitize and validate your data server-side as well.</em></p>
<p>The <strong><a href="http://digitalbush.com/projects/masked-input-plugin/">Masked Input jQuery plugin</a></strong> can implement both of these features for us. It will let you define any custom mask, and you can use its &#8220;completed&#8221; callback function to flag the inputs as valid.</p>
<h4>Better Support for Defaults</h4>
<p>HTML inputs do allow for default values, but its nice to have them disappear when the input gains focus, and reappear on blur if the user hasn&#8217;t entered anything.</p>
<p>The aptly named <strong><a href="http://plugins.jquery.com/project/defaultvalue">Default Values plugin</a></strong> does exactly that.</p>
<h4>AJAX Form Submission</h4>
<p>Submitting forms can be a great use of AJAX, particularly if you have a series of forms which are affected by the user entered values (i.e. a wizard). Its also a nice way to break a long form into stages to decrease abandonment.</p>
<p>The <strong><a href="http://malsup.com/jquery/form/">jQuery Form Plugin</a></strong> is an easy way to convert your current forms to AJAX forms while preserving their functionality for users without Javascript. If you are feeling creative or want to write something more customized, <strong><a href="http://docs.jquery.com/Ajax/serialize">jQuery&#8217;s serialize function</a></strong> will get you almost all the way there.</p>
<h4>Automatically Growing Textareas</h4>
<p>If you&#8217;ve used <a href="http://facebook.com">Facebook</a> or <a href="http://basecamphq.com">Basecamp</a>, you&#8217;ve probably noticed that the textareas get longer when you&#8217;re running out of space. Its aesthetically pleasing and very convenient.</p>
<p>Here&#8217;s a <a href="http://plugins.jquery.com/project/autogrow"><strong>jQuery plugin</strong></a> to add the same behavior to your textareas.</p>
<h4>Spin Buttons</h4>
<p>A spin button is a text box with up/down arrows, allowing the user to easily &#8220;nudge&#8221; a numeric value up or down. Like a combo box, the user can still type in their own value.</p>
<p>They are most useful when the range of possible values is fairly small &#8211; for example selecting the number of diners in a reservation.</p>
<p>The <strong><a href="http://code.google.com/p/jquery-spin-button/">jQuery Spin Button</a></strong> plugin is a nice implementation of this control.</p>
<h4>One More Thing</h4>
<p>Each of these ten solutions requires at least one external javascript library, and some require stylesheets. Implementing all ten would be great, but including a bunch of external javascript / css files can drastically increase the load time of your page.</p>
<p>Therefore, we recommend you do 2 things:</p>
<ol>
<li>Concatenate your Javascript and CSS files as much as makes sense.</li>
<li>Compress them using Dean Edward&#8217;s <a href="http://dean.edwards.name/packer/">packer</a> and <a href="http://www.cssdrive.com/index.php/main/csscompressor/">CSSDrive&#8217;s CSS Compressor</a>, respectively.</li>
</ol>
<p>Also, if you know of any scripts that we missed here let us know in the comments. Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminatikarate.com/blog/10-javascript-tricks-for-better-forms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

