<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: defaultValueActsAsHint</title>
	<atom:link href="http://ajaxian.com/archives/defaultvalueactsashint/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/defaultvalueactsashint</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: 6265565</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-273690</link>
		<dc:creator>6265565</dc:creator>
		<pubDate>Tue, 02 Jun 2009 08:13:44 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-273690</guid>
		<description>It’s currently at version 2.0.2, and has lots more options than just clearing/populating the inputs, such as conditional classes for styling, and clearing unchanged values on submit.</description>
		<content:encoded><![CDATA[<p>It’s currently at version 2.0.2, and has lots more options than just clearing/populating the inputs, such as conditional classes for styling, and clearing unchanged values on submit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dustincaruso</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270461</link>
		<dc:creator>dustincaruso</dc:creator>
		<pubDate>Wed, 14 Jan 2009 17:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270461</guid>
		<description>We&#039;ve been doing this in schmedley on a bunch of our schmidgets and we&#039;re using MooTools. After reading this article I was inspired to make a similar contribution - so, I made some quick edits to the code we&#039;ve created and have posted an article with a MooTools class for this functionality on my site - &lt;a href=&quot;http://dustincaruso.com/2009/01/defaultvalueactsashint/&quot; rel=&quot;nofollow&quot;&gt;http://dustincaruso.com/2009/01/defaultvalueactsashint/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>We&#8217;ve been doing this in schmedley on a bunch of our schmidgets and we&#8217;re using MooTools. After reading this article I was inspired to make a similar contribution &#8211; so, I made some quick edits to the code we&#8217;ve created and have posted an article with a MooTools class for this functionality on my site &#8211; <a href="http://dustincaruso.com/2009/01/defaultvalueactsashint/" rel="nofollow">http://dustincaruso.com/2009/01/defaultvalueactsashint/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manalang</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270386</link>
		<dc:creator>manalang</dc:creator>
		<pubDate>Tue, 13 Jan 2009 05:35:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270386</guid>
		<description>Here&#039;s an improved jQuery plugin that doesn&#039;t use the value attribute because @oopstudio and @anewton&#039;s concerns above.  This version won&#039;t change the value after a refresh since it uses a title attribute instead.

http://gist.github.com/46340</description>
		<content:encoded><![CDATA[<p>Here&#8217;s an improved jQuery plugin that doesn&#8217;t use the value attribute because @oopstudio and @anewton&#8217;s concerns above.  This version won&#8217;t change the value after a refresh since it uses a title attribute instead.</p>
<p><a href="http://gist.github.com/46340" rel="nofollow">http://gist.github.com/46340</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: remy</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270383</link>
		<dc:creator>remy</dc:creator>
		<pubDate>Mon, 12 Jan 2009 23:14:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270383</guid>
		<description>Am I missing something, or is this virtually the same thing as this plugin - written 2 years ago:

http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/

and: 

http://www.alistapart.com/articles/makingcompactformsmoreaccessible

There&#039;s another version that was written about 6-9 months ago too - but I can&#039;t remember the link.

Have I missed the point - hasn&#039;t this pattern been implemented time and time again?</description>
		<content:encoded><![CDATA[<p>Am I missing something, or is this virtually the same thing as this plugin &#8211; written 2 years ago:</p>
<p><a href="http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/" rel="nofollow">http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/</a></p>
<p>and: </p>
<p><a href="http://www.alistapart.com/articles/makingcompactformsmoreaccessible" rel="nofollow">http://www.alistapart.com/articles/makingcompactformsmoreaccessible</a></p>
<p>There&#8217;s another version that was written about 6-9 months ago too &#8211; but I can&#8217;t remember the link.</p>
<p>Have I missed the point &#8211; hasn&#8217;t this pattern been implemented time and time again?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oopstudios</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270349</link>
		<dc:creator>oopstudios</dc:creator>
		<pubDate>Sun, 11 Jan 2009 22:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270349</guid>
		<description>It&#039;s a flawed implementation, if you are halfway through a form and refresh the page then _default is set to the halfway value. Definately a bad bit of code! Kinda OK for freckle as the form is so small, but I&#039;d reccomend against it.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a flawed implementation, if you are halfway through a form and refresh the page then _default is set to the halfway value. Definately a bad bit of code! Kinda OK for freckle as the form is so small, but I&#8217;d reccomend against it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: icoloma</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270339</link>
		<dc:creator>icoloma</dc:creator>
		<pubDate>Sat, 10 Jan 2009 13:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270339</guid>
		<description>I loved this implementation, but I agree further work would be nice to clear the values on form submission and supporting also select fields. Nice work,though.</description>
		<content:encoded><![CDATA[<p>I loved this implementation, but I agree further work would be nice to clear the values on form submission and supporting also select fields. Nice work,though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alexrabarts</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270333</link>
		<dc:creator>alexrabarts</dc:creator>
		<pubDate>Sat, 10 Jan 2009 02:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270333</guid>
		<description>An issue with using the &lt;code&gt;value&lt;/code&gt; attribute is that it can be overwirtten when a user hits the back button after submitting the form, leaving your hint text as the value just submitted.

I&#039;ve published a jQuery implementation on GitHub that gets around this issue and the accessibility issue of not providing a &lt;code&gt;label&lt;/code&gt; - by default, it grabs the value from the &lt;code&gt;label&lt;/code&gt; and moves the &lt;code&gt;label&lt;/code&gt; off-screen.  You can override this behaviour if you want to use the &lt;code&gt;value&lt;/code&gt; attribute, though.

http://github.com/alexrabarts/jquery-clearinginput</description>
		<content:encoded><![CDATA[<p>An issue with using the <code>value</code> attribute is that it can be overwirtten when a user hits the back button after submitting the form, leaving your hint text as the value just submitted.</p>
<p>I&#8217;ve published a jQuery implementation on GitHub that gets around this issue and the accessibility issue of not providing a <code>label</code> &#8211; by default, it grabs the value from the <code>label</code> and moves the <code>label</code> off-screen.  You can override this behaviour if you want to use the <code>value</code> attribute, though.</p>
<p><a href="http://github.com/alexrabarts/jquery-clearinginput" rel="nofollow">http://github.com/alexrabarts/jquery-clearinginput</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anewton</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270318</link>
		<dc:creator>anewton</dc:creator>
		<pubDate>Fri, 09 Jan 2009 16:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270318</guid>
		<description>For MooTools: http://www.clientcide.com/wiki/cnet-libraries/09-forms/05-overtext</description>
		<content:encoded><![CDATA[<p>For MooTools: <a href="http://www.clientcide.com/wiki/cnet-libraries/09-forms/05-overtext" rel="nofollow">http://www.clientcide.com/wiki/cnet-libraries/09-forms/05-overtext</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twoism</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270316</link>
		<dc:creator>twoism</dc:creator>
		<pubDate>Fri, 09 Jan 2009 15:50:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270316</guid>
		<description>In Jquery:
&lt;code&gt;
(function($){
	$.fn.defaultValueActsAsHint = function(){
		$(this).focus(function(){
			if(this._default != this.value) return;
			this.value = &quot;&quot;;
		}).removeClass(&#039;hint&#039;).blur(function(){
			if(this.value != &#039;&#039;) return;
			this.value = this._default;
		}).addClass(&#039;hint&#039;).get(0)._default = this.val();
	};
})(jQuery);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>In Jquery:<br />
<code><br />
(function($){<br />
	$.fn.defaultValueActsAsHint = function(){<br />
		$(this).focus(function(){<br />
			if(this._default != this.value) return;<br />
			this.value = "";<br />
		}).removeClass('hint').blur(function(){<br />
			if(this.value != '') return;<br />
			this.value = this._default;<br />
		}).addClass('hint').get(0)._default = this.val();<br />
	};<br />
})(jQuery);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atnan</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270314</link>
		<dc:creator>atnan</dc:creator>
		<pubDate>Fri, 09 Jan 2009 13:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270314</guid>
		<description>If you&#039;re interested in a slightly more robust solution that doesn&#039;t require you to manually call defaultValueActsAsHint() on each element you&#039;d like to &quot;hint&quot;, you should check out my Ghostie project on Github (http://github.com/atnan/ghostie/tree/master), which allows you to add a CSS class of &quot;ghostie&quot; to any text/password field and it will automatically pull the value specified in the &quot;title&quot; attribute in as the default text. It also ensures that the default value is cleared if the form is submitted, and also adds a class of &quot;ghostied&quot; when the default value is populated so that you can style the default state easily.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re interested in a slightly more robust solution that doesn&#8217;t require you to manually call defaultValueActsAsHint() on each element you&#8217;d like to &#8220;hint&#8221;, you should check out my Ghostie project on Github (<a href="http://github.com/atnan/ghostie/tree/master" rel="nofollow">http://github.com/atnan/ghostie/tree/master</a>), which allows you to add a CSS class of &#8220;ghostie&#8221; to any text/password field and it will automatically pull the value specified in the &#8220;title&#8221; attribute in as the default text. It also ensures that the default value is cleared if the form is submitted, and also adds a class of &#8220;ghostied&#8221; when the default value is populated so that you can style the default state easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akuzemchak</title>
		<link>http://ajaxian.com/archives/defaultvalueactsashint/comment-page-1#comment-270313</link>
		<dc:creator>akuzemchak</dc:creator>
		<pubDate>Fri, 09 Jan 2009 13:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5606#comment-270313</guid>
		<description>jQuery users should check out &lt;a href=&quot;http://jquery.kuzemchak.net/toggleval.php&quot; rel=&quot;nofollow&quot;&gt;ToggleVal&lt;/a&gt;. It&#039;s currently at version 2.0.2, and has lots more options than just clearing/populating the inputs, such as conditional classes for styling, and clearing unchanged values on submit.</description>
		<content:encoded><![CDATA[<p>jQuery users should check out <a href="http://jquery.kuzemchak.net/toggleval.php" rel="nofollow">ToggleVal</a>. It&#8217;s currently at version 2.0.2, and has lots more options than just clearing/populating the inputs, such as conditional classes for styling, and clearing unchanged values on submit.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

