<?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>Brendan &#38; Tiffany Sullivan &#187; javascript</title>
	<atom:link href="http://www.sullivanrealm.net/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sullivanrealm.net</link>
	<description>Apparently we&#039;re nomads. OH, IL, TN, now UP Michigan...</description>
	<lastBuildDate>Tue, 03 Jan 2012 13:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Latest work &#8211; Internal Kiosk Site</title>
		<link>http://www.sullivanrealm.net/2010/01/27/latest-work-internal-kiosk-site/</link>
		<comments>http://www.sullivanrealm.net/2010/01/27/latest-work-internal-kiosk-site/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 03:48:26 +0000</pubDate>
		<dc:creator>brendan</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[kiosk]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sullivanrealm.net/?p=641</guid>
		<description><![CDATA[I finally have something really cool to show from my job. We have a client who wanted a &#8220;Kiosk&#8221; in their rental office that guests could browse through the various units they have available. It did not need to do anything that different than our normal web work&#8230;.choose arrival date, number of nights, number of [...]]]></description>
			<content:encoded><![CDATA[<p>I finally have something really cool to show from my job. We have a client who wanted a &#8220;Kiosk&#8221; in their rental office that guests could browse through the various units they have available. It did not need to do anything that different than our normal web work&#8230;.choose arrival date, number of nights, number of guests, etc. The challenge was how to do it all with JUST a touch screen for input. The &#8220;kiosk&#8221; was going to be one of the new &#8220;all-in-one&#8221; MSI Wind Top PC&#8217;s with a 20&#8243; touch screen.</p>
<div id="attachment_659" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/index.jpg"><img class="size-medium wp-image-659" title="index" src="http://www.sullivanrealm.net/wp-content/uploads/2010/01/index-400x249.jpg" alt="Index Page" width="400" height="249" /></a><p class="wp-caption-text">Index Page.... simple, no nonsense. Also -- Boring</p></div>
<p>I had <em>some</em> idea of what was going on since I built a small .mobi site for this company last year geared toward the iPhone/iPod Touch. It turned out OK, but was nothing I really felt stood out. It works, but I honestly don&#8217;t think it gets much attention. I&#8217;d like to revisit it sometime and make some improvements with what I&#8217;ve learned on this project.</p>
<div id="attachment_656" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/date-select.jpg"><img class="size-medium wp-image-656" title="date-select" src="http://www.sullivanrealm.net/wp-content/uploads/2010/01/date-select-400x250.jpg" alt="" width="400" height="250" /></a><p class="wp-caption-text">Date and Nights Selection</p></div>
<p>The site will not be available outside of this office, but I&#8217;ve got some screenshots AND A VIDEO showing off the functionality. I&#8217;m not much of a designer, so it&#8217;s not as pretty as it could be probably, but it works I think. I&#8217;ll post a couple of the fun jQuery stuff I found/did as well. I think the most instructional and entertaining part was modifying the jQuery quicksearch plugin from <a href="http://rikrikrik.com/jquery/quicksearch/" target="_blank">www.rikrikrik.com</a> to be able to use an on-screen keyboard.</p>
<p>And somehow I don&#8217;t have a screenshot of that&#8230;will update later <img src='http://www.sullivanrealm.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Rather than creating a separate keyboard and try to tie it into the event handling for quicksearch, I ended up extending the plugin, adding new functionality through the options passed during the .quicksearch() call so the keyboard was fully integrated. It took some trial and error, and it likely could be done &#8220;better&#8221;, but it works, and functions great.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'table#cabin_names tbody tr'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">quicksearch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
				position<span style="color: #339933;">:</span><span style="color: #3366CC;">'after'</span><span style="color: #339933;">,</span>
				attached<span style="color: #339933;">:</span><span style="color: #3366CC;">'#uber_wrap'</span><span style="color: #339933;">,</span>
				labelText<span style="color: #339933;">:</span><span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>
				inputClass<span style="color: #339933;">:</span><span style="color: #3366CC;">'sel wide'</span><span style="color: #339933;">,</span>
				watchElement<span style="color: #339933;">:</span><span style="color: #3366CC;">'li.alpha_btns'</span><span style="color: #339933;">,</span>
				keyboard<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
				keyboardId<span style="color: #339933;">:</span> <span style="color: #3366CC;">'alpha_btns'</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The &#8216;watchElement&#8217; option is the elements that should trigger the qs() function in quicksearch. &#8216;keyboard&#8217; defaults to false, but when set to <strong>true</strong>, it renders the html to insert the keyboard and bind the events to do the proper stuff. &#8216;keyboardId&#8217; just lets you define the element Id so you can style at will. This extension of the plugin likely has no real use beyond sites designed for touch screens, but it was still educational, and was an interesting introduction to plugins in jQuery. I&#8217;ve never written my own, but if I find some functionality I need in the future, maybe I can break into that field too.</p>
<div id="attachment_658" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/guest-select.jpg"><img class="size-medium wp-image-658" title="guest-select" src="http://www.sullivanrealm.net/wp-content/uploads/2010/01/guest-select-400x250.jpg" alt="" width="400" height="250" /></a><p class="wp-caption-text"># of Guests</p></div>
<p>Anyhow, there&#8217;s not much else to say. This site was designed specifically for this screen, specifically to run in Firefox, specifically in Fullscreen mode. If I had more time I think it could be made to be a bit more flexible, but I suck at CSS, and I just didn&#8217;t know how to make a few things flow fluidly on different sized screens. Enjoy!</p>
<p><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/kiosk_demo.wmv">kiosk_demo</a></p>
<div id="attachment_655" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/cabin-list.jpg"><img class="size-medium wp-image-655" title="cabin-list" src="http://www.sullivanrealm.net/wp-content/uploads/2010/01/cabin-list-400x251.jpg" alt="" width="400" height="251" /></a><p class="wp-caption-text">List of cabins available for selected dates and # of guests</p></div>
<p>One of the other really fun things to write/integrate was the scrolling buttons. I realized after the initial design that having regular scrollbars just wouldn&#8217;t be usable with a touch screen interface. Theoretically I could have altered the Firefox userContent.css to enlarge the scroll bars to the point they <em>would</em> have been usable, but that just didn&#8217;t feel right. Once again, though, jQuery plugins to the rescue! I found a nice little scrolling plugin that allowed me to bind relative scroll positions <strong>with easing</strong> to click events on the fixed-position nav-box on the right side. Not sure I&#8217;m thrilled with how it looks right now, but at least it&#8217;s functionally complete. Can always tweak it down the road.</p>
<div id="attachment_657" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/filters.jpg"><img class="size-medium wp-image-657" title="filters" src="http://www.sullivanrealm.net/wp-content/uploads/2010/01/filters-400x250.jpg" alt="" width="400" height="250" /></a><p class="wp-caption-text">Fun screen to write. &quot;Buttons&quot; are actually labels for hidden checkboxes. jQuery styling changes make it look fancy</p></div>
<div id="attachment_654" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.sullivanrealm.net/wp-content/uploads/2010/01/cabin.jpg"><img class="size-medium wp-image-654" title="cabin" src="http://www.sullivanrealm.net/wp-content/uploads/2010/01/cabin-400x252.jpg" alt="" width="400" height="252" /></a><p class="wp-caption-text">Individual cabin page...small photos are clickable to rotate through pictures</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sullivanrealm.net/2010/01/27/latest-work-internal-kiosk-site/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.sullivanrealm.net/wp-content/uploads/2010/01/kiosk_demo.wmv" length="6130077" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>couple of fun and useful jQuery Plugins</title>
		<link>http://www.sullivanrealm.net/2009/11/12/couple-of-fun-and-useful-jquery-plugins/</link>
		<comments>http://www.sullivanrealm.net/2009/11/12/couple-of-fun-and-useful-jquery-plugins/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 05:00:57 +0000</pubDate>
		<dc:creator>brendan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[ajaxForm]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.sullivanrealm.net/?p=117</guid>
		<description><![CDATA[I am far from an accomplished web developer, but jQuery is one tool that helps out immensely in writing javascript that &#8220;just works&#8221;. As many of you are aware, browser differences create all sorts of havoc when trying to write code that navigates the DOM. And writing code from scratch to validate forms is a [...]]]></description>
			<content:encoded><![CDATA[<p>I am far from an accomplished web developer, but jQuery is one tool that helps out immensely in writing javascript that &#8220;just works&#8221;. As many of you are aware, browser differences create all sorts of havoc when trying to write code that navigates the DOM. And writing code from scratch to validate forms is a serious pain in the butt. So here are a few <a href="http://jquery.com">jQuery</a> plugins that might make your life a little easier in that regard.</p>
<p>First off, there is the the combined magic of the <a href="http://malsup.com/jquery/form/">jquery Form plugin from malsup.com</a> which creates a nice AJAX-submitted form with one quick line of code</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#form'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ajaxForm</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Optionally, you can pass the .ajaxForm() function any <a href="http://docs.jquery.com/Ajax/jQuery.ajax#options">options</a> that you would normally pass to a regular jQuery .ajax() method like so&#8230;.</p>
<p>Now that&#8217;s fun, but it can be extended just a LITTLE bit more with the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jquery validate plugin</a>. Here we can define some simple rules in JSON format and the validation plugin will automatically display customizable messages for any errors that are found before submitting the form. The validation function takes the option <em>submitHandler </em>to create the ajaxSubmit event from the Form plugin above.</p>
<p>Here is an example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#contactus_form'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	submitHandler<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>form<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span>form<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ajaxSubmit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
			error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	rules<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;required&quot;</span><span style="color: #339933;">,</span>
		email<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
			required<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
			email<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		message<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;required&quot;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	messages<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Name is required&quot;</span><span style="color: #339933;">,</span>
		email<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
			required<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Email is required&quot;</span><span style="color: #339933;">,</span>
			email<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Email is in an invalid format&quot;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		message<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Some message to the staff is required&quot;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	errorLabelContainer<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;#ajaxmsg&quot;</span><span style="color: #339933;">,</span>
	wrapper<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;li&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Obviously you need to validate the data in whatever script you are handling on the server side, but the jQuery error messages are a great way to improve your forms usability and they can be styled to be attractive and make any input errors very clear to your users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sullivanrealm.net/2009/11/12/couple-of-fun-and-useful-jquery-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

