<?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: jquery.fieldtag.js &#8211; watermarks for inputfields</title>
	<atom:link href="http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/feed/" rel="self" type="application/rss+xml" />
	<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/</link>
	<description>mental farts of a web developer</description>
	<lastBuildDate>Thu, 29 Jul 2010 15:42:51 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 55 jQuery Form Plugins To Download And Use : Free Pictures</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-1139</link>
		<dc:creator>55 jQuery Form Plugins To Download And Use : Free Pictures</dc:creator>
		<pubDate>Thu, 29 Jul 2010 15:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-1139</guid>
		<description>[...] watermarks for inputfields [...]</description>
		<content:encoded><![CDATA[<p>[...] watermarks for inputfields [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 55 jQuery Form Plugins To Download And Use &#171; qeqnes &#124; Designing. jQuery, Ajax, PHP, MySQL and Templates</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-1070</link>
		<dc:creator>55 jQuery Form Plugins To Download And Use &#171; qeqnes &#124; Designing. jQuery, Ajax, PHP, MySQL and Templates</dc:creator>
		<pubDate>Fri, 02 Jul 2010 09:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-1070</guid>
		<description>[...] watermarks for inputfields [...]</description>
		<content:encoded><![CDATA[<p>[...] watermarks for inputfields [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 55 jQuery Form Plugins To Download And Use&#160;&#124;&#160;Design your way</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-1067</link>
		<dc:creator>55 jQuery Form Plugins To Download And Use&#160;&#124;&#160;Design your way</dc:creator>
		<pubDate>Wed, 30 Jun 2010 00:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-1067</guid>
		<description>[...] watermarks for inputfields [...]</description>
		<content:encoded><![CDATA[<p>[...] watermarks for inputfields [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-1040</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 15 Jun 2010 09:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-1040</guid>
		<description>How can I get this to work with password input fields? I&#039;m not a jquery expert... any help would be much appreciated!</description>
		<content:encoded><![CDATA[<p>How can I get this to work with password input fields? I&#8217;m not a jquery expert&#8230; any help would be much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ants</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-829</link>
		<dc:creator>Ants</dc:creator>
		<pubDate>Fri, 30 Apr 2010 15:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-829</guid>
		<description>Some strange encoding removed my  drop down list code:

here is what the onchange event looks like:

onchange=&quot;this.form.clearAndSubmit();&quot;&gt;</description>
		<content:encoded><![CDATA[<p>Some strange encoding removed my  drop down list code:</p>
<p>here is what the onchange event looks like:</p>
<p>onchange=&#8221;this.form.clearAndSubmit();&#8221;&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ants</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-828</link>
		<dc:creator>Ants</dc:creator>
		<pubDate>Fri, 30 Apr 2010 14:58:57 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-828</guid>
		<description>You can use the following code to clear and submit the form via javascript:

Change to jquery.fieldtag.js:
if (this.form) {
	this.form.tagFieldsToClear = this.form.tagFieldsToClear &#124;&#124; [];
	this.form.tagFieldsToClear.push(this);

	if (this.form.tagFieldsAreCleared) { return true; }
	this.form.tagFieldsAreCleared = true;

	$(this.form).submit(function () {
		$(this.tagFieldsToClear).each(function () {
			this.clear();
		});
	});
    /* BEGIN-CHANGE: Added Method to form for submitting form but clearing first*/
	this.form.clearAndSubmit = function () {
		$(this.tagFieldsToClear).each(function () {
			this.clear();
		});
		this.submit();
	};
	/* END-CHANGE */
}


An example of a drop down list posting a form using the clearAndSubmit method:

	None
	One
	Two
	Three
</description>
		<content:encoded><![CDATA[<p>You can use the following code to clear and submit the form via javascript:</p>
<p>Change to jquery.fieldtag.js:<br />
if (this.form) {<br />
	this.form.tagFieldsToClear = this.form.tagFieldsToClear || [];<br />
	this.form.tagFieldsToClear.push(this);</p>
<p>	if (this.form.tagFieldsAreCleared) { return true; }<br />
	this.form.tagFieldsAreCleared = true;</p>
<p>	$(this.form).submit(function () {<br />
		$(this.tagFieldsToClear).each(function () {<br />
			this.clear();<br />
		});<br />
	});<br />
    /* BEGIN-CHANGE: Added Method to form for submitting form but clearing first*/<br />
	this.form.clearAndSubmit = function () {<br />
		$(this.tagFieldsToClear).each(function () {<br />
			this.clear();<br />
		});<br />
		this.submit();<br />
	};<br />
	/* END-CHANGE */<br />
}</p>
<p>An example of a drop down list posting a form using the clearAndSubmit method:</p>
<p>	None<br />
	One<br />
	Two<br />
	Three</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: we</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-780</link>
		<dc:creator>we</dc:creator>
		<pubDate>Tue, 20 Apr 2010 02:01:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-780</guid>
		<description>doesn&#039;t work in Password fields, i&#039;m getting asterisks!!</description>
		<content:encoded><![CDATA[<p>doesn&#8217;t work in Password fields, i&#8217;m getting asterisks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt kauffman</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-568</link>
		<dc:creator>matt kauffman</dc:creator>
		<pubDate>Thu, 18 Feb 2010 23:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-568</guid>
		<description>If anyone runs into an issue where in some browsers hitting refresh or the back button causes the plugin not to work (because the browser is pre-populating the fields with the watermarked value) you can fix it by changing the keyup event to this:

			.keyup(function(){
				this.changed = ($(this).val() &amp;&amp; $(this).val() !== $(this).attr(&#039;title&#039;) ? true : false);
			}) 

Otherwise works like a charm!</description>
		<content:encoded><![CDATA[<p>If anyone runs into an issue where in some browsers hitting refresh or the back button causes the plugin not to work (because the browser is pre-populating the fields with the watermarked value) you can fix it by changing the keyup event to this:</p>
<p>			.keyup(function(){<br />
				this.changed = ($(this).val() &amp;&amp; $(this).val() !== $(this).attr(&#8217;title&#8217;) ? true : false);<br />
			}) </p>
<p>Otherwise works like a charm!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sarah</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-546</link>
		<dc:creator>sarah</dc:creator>
		<pubDate>Wed, 03 Feb 2010 06:24:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-546</guid>
		<description>this is the first watermark code i found that actually WORKED!!!
thanks so much for sharing, what a champ!</description>
		<content:encoded><![CDATA[<p>this is the first watermark code i found that actually WORKED!!!<br />
thanks so much for sharing, what a champ!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ngi644の日記 &#187; Blog Archive &#187; Ploneのテキストフィールドのデフォルト文字</title>
		<link>http://ajaxcssblog.com/jquery/fieldtag-watermark-inputfields/comment-page-1/#comment-534</link>
		<dc:creator>ngi644の日記 &#187; Blog Archive &#187; Ploneのテキストフィールドのデフォルト文字</dc:creator>
		<pubDate>Wed, 27 Jan 2010 07:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxcssblog.com/?p=58#comment-534</guid>
		<description>[...] Ploneのテキストフィールドのデフォルト文字 1月 27, 2010 3:59 pm ngi644 Zope/Plone  テキストフィールド欄にデフォルト文字を表示させたいとき、一般的には、jquery.fieldtab.jsを使う。 [...]</description>
		<content:encoded><![CDATA[<p>[...] Ploneのテキストフィールドのデフォルト文字 1月 27, 2010 3:59 pm ngi644 Zope/Plone  テキストフィールド欄にデフォルト文字を表示させたいとき、一般的には、jquery.fieldtab.jsを使う。 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
