<?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>FettesPS &#187; auto focus</title>
	<atom:link href="http://www.fettesps.com/tag/auto-focus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fettesps.com</link>
	<description>Fettes Programming Solutions</description>
	<lastBuildDate>Sun, 22 Jan 2012 18:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>JavaScript &#8211; Auto Set Focus When Page is Done Loading</title>
		<link>http://www.fettesps.com/javascript-auto-set-focus-when-page-is-done-loading/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-auto-set-focus-when-page-is-done-loading</link>
		<comments>http://www.fettesps.com/javascript-auto-set-focus-when-page-is-done-loading/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 22:22:46 +0000</pubDate>
		<dc:creator>FettesPS</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[auto focus]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[login page]]></category>
		<category><![CDATA[set focus]]></category>

		<guid isPermaLink="false">http://www.fettesps.com/?p=272</guid>
		<description><![CDATA[I use this block of code quite often. Almost every project I develop has a login page and I always toss this in to give it that subtle boost to the overall user experience. Once the page has loaded, the cursor location will automatically be set to the username field so the user doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>I use this block of code quite often. Almost every project I develop has a login page and I always toss this in to give it that subtle boost to the overall user experience.  Once the page has loaded, the cursor location will automatically be set to the username field so the user doesn&#8217;t have to grab their mouse or tab over to it just to log in.  I&#8217;ve seen far too many site that don&#8217;t use this and it always frustrates me.</p>
<pre class="brush: jscript; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;
	window.onload = function() {
		document.forms[0].username.focus();
	}
&lt;/script&gt;</pre>
<p>I would also recommend this on any page that has a form element on it that must be filled out.  However be careful not to use it on a page that has a form field that the user may not be interested in.  A good example of bad placement for this block of code is <a href="http://www.avnads.com" target="_new">AVN Ads</a> which sets focus to the search box instead of the username field.  Every time I go there I get half way through typing my username and password before it jumps up to the search box and I in my haste I end up typing my password into the search field for all the world to see. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.fettesps.com/javascript-auto-set-focus-when-page-is-done-loading/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

