<?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>andr3w.net &#187; html</title>
	<atom:link href="http://andr3w.net/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://andr3w.net</link>
	<description>amateur web development...</description>
	<lastBuildDate>Fri, 20 Aug 2010 21:08:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Search Field Text Without a Submit Button</title>
		<link>http://andr3w.net/2010/03/search-field-text-without-a-submit-button/</link>
		<comments>http://andr3w.net/2010/03/search-field-text-without-a-submit-button/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 17:34:25 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[site updates]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://andr3w.net/?p=185</guid>
		<description><![CDATA[If you are trying to implement a search field in your website but do not plan on having a submit button (relying on the user to click enter), you&#8217;re going to want to put instructions somewhere. In my case, I decided to populate the box it self with the words &#8220;Type and press enter to [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to implement a search field in your website but do not plan on having a submit button (relying on the user to click enter), you&#8217;re going to want to put instructions somewhere.</p>
<p>In my case, I decided to populate the box it self with the words &#8220;Type and press enter to search&#8221;.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;q&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Type and press enter to search.&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchfield&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Unfortunately, this left the user with the task of manually deleting the text in the box before searching. Adding a tiny bit of javascript to your HTML element will automatically remove the text when the user clicks on it <em>and</em> if the user doesn&#8217;t enter anything it will add the text back when the user clicks away.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;q&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Type and press enter to search.&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchfield&quot;</span> </span><br />
<span style="color: #009900;"><span style="color: #000066;">onfocus</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;if ( this.value=='Type and press enter to search.' ) { this.value = ''; }&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">onblur</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;if ( this.value=='' ) { this.value = 'Type and press enter to search.'; }&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Hopefully it works for you all, I have only tested it in Firefox and Safari on a Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://andr3w.net/2010/03/search-field-text-without-a-submit-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad HTML</title>
		<link>http://andr3w.net/2009/04/bad-html/</link>
		<comments>http://andr3w.net/2009/04/bad-html/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 23:46:00 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[site updates]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://andr3w.net/?p=101</guid>
		<description><![CDATA[Sorry to any visitors affected by the malformed site that cropped up due to my last post&#8230; Old habits die hard, and I write too many of my posts in HTML only to have a missing quotation mark leave my page poorly rendered. I need to rely on the (fairly) excellent built in wordpress wysiwyg [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry to any visitors affected by the malformed site that cropped up due to my last post&#8230;</p>
<p>Old habits die hard, and I write too many of my posts in HTML only to have a missing quotation mark leave my page poorly rendered. I need to rely on the (fairly) excellent built in wordpress wysiwyg editor. At least until I write a proper, custom blog engine for this page&#8230;</p>
<p>The affected post has been fixed and you can now go about your business.</p>
]]></content:encoded>
			<wfw:commentRss>http://andr3w.net/2009/04/bad-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
