<?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 Plugin &#8211; Form Field Default Value</title>
	<atom:link href="http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/</link>
	<description></description>
	<lastBuildDate>Wed, 25 Jan 2012 22:50:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: DeadMan</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-774</link>
		<dc:creator>DeadMan</dc:creator>
		<pubDate>Wed, 21 Sep 2011 12:45:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-774</guid>
		<description>Hi,,

I have a solution to this issue. I don&#039;t know whether its works in all conditions. I tested few. It works fine with my application.
 (I am having trouble with $(‘.default-value’), I am using validationEngine plugin but still can’t figure it out that from where this $(‘.default-value’) comes, I will appreciate any kind of help). I modified the plugin&#039;s code in 

FROM:
//Capture parent form submission
            //Remove field values that are still default
            $(this).parents(&quot;form&quot;).each(function() {
                //Bind parent form submit
                $(this).submit(function() {
                    if(fld_current.value==text) {
                        fld_current.value=&#039; &#039;;
                    }
                });
            });
TO:

//Capture parent form submission
            //Remove field values that are still default
            $(this).parents(&quot;form&quot;).each(function() {
                //Bind parent form submit
                $(this).submit(function() {
                    if(fld_current.value==text) {
                        fld_current.value=text;
                    }
                });
            });

I mainly modified fld_current.value =&#039; &#039; to fld_current.value=text. It works fine with my application. 

Thanks,
deadmaN</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Hi,,</p>
<p>I have a solution to this issue. I don&#8217;t know whether its works in all conditions. I tested few. It works fine with my application.<br />
 (I am having trouble with $(‘.default-value’), I am using validationEngine plugin but still can’t figure it out that from where this $(‘.default-value’) comes, I will appreciate any kind of help). I modified the plugin&#8217;s code in </p>
<p>FROM:<br />
//Capture parent form submission<br />
            //Remove field values that are still default<br />
            $(this).parents(&#8220;form&#8221;).each(function() {<br />
                //Bind parent form submit<br />
                $(this).submit(function() {<br />
                    if(fld_current.value==text) {<br />
                        fld_current.value=&#8217; &#8216;;<br />
                    }<br />
                });<br />
            });<br />
TO:</p>
<p>//Capture parent form submission<br />
            //Remove field values that are still default<br />
            $(this).parents(&#8220;form&#8221;).each(function() {<br />
                //Bind parent form submit<br />
                $(this).submit(function() {<br />
                    if(fld_current.value==text) {<br />
                        fld_current.value=text;<br />
                    }<br />
                });<br />
            });</p>
<p>I mainly modified fld_current.value =&#8217; &#8216; to fld_current.value=text. It works fine with my application. </p>
<p>Thanks,<br />
deadmaN</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: DeadMan</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-773</link>
		<dc:creator>DeadMan</dc:creator>
		<pubDate>Wed, 21 Sep 2011 12:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-773</guid>
		<description>Hey, Thanks for giving such a nice plugin to us. Here in my application, I am facing a problem. I have form with two buttons(submit, reset). When I click on reset, it is clearing the default values also. Could you please help me out in this. 

Thanks 
deadmaN</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Hey, Thanks for giving such a nice plugin to us. Here in my application, I am facing a problem. I have form with two buttons(submit, reset). When I click on reset, it is clearing the default values also. Could you please help me out in this. </p>
<p>Thanks<br />
deadmaN</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: The UK Flights</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-768</link>
		<dc:creator>The UK Flights</dc:creator>
		<pubDate>Tue, 12 Jul 2011 22:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-768</guid>
		<description>Hi!

For Jquery 1.6 use this code
jQuery(&quot;#fname&quot;).prop(&#039;defaultValue&#039;);

Previous: its used .attr(&#039;defaultValue&#039;);

Hope this help to some one..</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Hi!</p>
<p>For Jquery 1.6 use this code<br />
jQuery(&#8220;#fname&#8221;).prop(&#8216;defaultValue&#8217;);</p>
<p>Previous: its used .attr(&#8216;defaultValue&#8217;);</p>
<p>Hope this help to some one..</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-460</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 27 May 2011 01:27:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-460</guid>
		<description>Hi Dennis,

I wasn&#039;t aware that the plugin didn&#039;t work under 1.6. I&#039;ll run a few tests this weekend and push out an updated version.

As soon as it&#039;s ready I&#039;ll post another blog and link this article to the new one.

Thanks for bringing it to my attention.</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Hi Dennis,</p>
<p>I wasn&#8217;t aware that the plugin didn&#8217;t work under 1.6. I&#8217;ll run a few tests this weekend and push out an updated version.</p>
<p>As soon as it&#8217;s ready I&#8217;ll post another blog and link this article to the new one.</p>
<p>Thanks for bringing it to my attention.</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Deacon</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-459</link>
		<dc:creator>Dennis Deacon</dc:creator>
		<pubDate>Thu, 26 May 2011 16:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-459</guid>
		<description>Not sure if you plan to update this script, but it doesn&#039;t work with jQuery 1.6x.  Any thoughts?</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Not sure if you plan to update this script, but it doesn&#8217;t work with jQuery 1.6x.  Any thoughts?</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-455</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 22 May 2011 14:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-455</guid>
		<description>Hi Luc,

Please have a look at the code below.  I spent some time this morning integrating my plugin with the jQuery Validator plugin and coded up a simple way around the issue you guys are having.  Please see below and let me know if you have any questions.

&lt;code&gt;
		$(document).ready(function() {
			//Initially set default values
			set_defaults();
			
			//Configure form validator
			var $validator = jQuery(&quot;#testform&quot;).validate();
			$validator.settings.showErrors = function(){
				//Reset default values
				set_defaults();
				
				//Call default show errors
				$validator.defaultShowErrors();
			}
		});
		
		function set_defaults(){
			//Assign default value to form field #1
			$(&quot;#fname&quot;).DefaultValue(&quot;Enter your first name..&quot;);
			$(&quot;#lname&quot;).DefaultValue(&quot;Enter your last name..&quot;);
			$(&quot;#desc&quot;).DefaultValue(&quot;Describe yourself...&quot;);
		}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Hi Luc,</p>
<p>Please have a look at the code below.  I spent some time this morning integrating my plugin with the jQuery Validator plugin and coded up a simple way around the issue you guys are having.  Please see below and let me know if you have any questions.</p>
<p><code><br />
		$(document).ready(function() {<br />
			//Initially set default values<br />
			set_defaults();</p>
<p>			//Configure form validator<br />
			var $validator = jQuery("#testform").validate();<br />
			$validator.settings.showErrors = function(){<br />
				//Reset default values<br />
				set_defaults();</p>
<p>				//Call default show errors<br />
				$validator.defaultShowErrors();<br />
			}<br />
		});</p>
<p>		function set_defaults(){<br />
			//Assign default value to form field #1<br />
			$("#fname").DefaultValue("Enter your first name..");<br />
			$("#lname").DefaultValue("Enter your last name..");<br />
			$("#desc").DefaultValue("Describe yourself...");<br />
		}<br />
</code></p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: Luc</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-453</link>
		<dc:creator>Luc</dc:creator>
		<pubDate>Sun, 22 May 2011 08:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-453</guid>
		<description>I have the same question as Julian on August 11, 2010 :

Upon submitting the form, fields which still contain the default value are set to empty and if a form validation script stops the submitting process I end up with a bunch of empty fields.
How can I fill the empty fields with the default values back?</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>I have the same question as Julian on August 11, 2010 :</p>
<p>Upon submitting the form, fields which still contain the default value are set to empty and if a form validation script stops the submitting process I end up with a bunch of empty fields.<br />
How can I fill the empty fields with the default values back?</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: Jenifer Smith</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-448</link>
		<dc:creator>Jenifer Smith</dc:creator>
		<pubDate>Wed, 13 Apr 2011 12:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-448</guid>
		<description>hi,

I am having trouble with $(&#039;.default-value&#039;), I am using validationEngine plugin but still can&#039;t figure it out that from where this $(&#039;.default-value&#039;) comes, I will appreciate any kind of help

thanks,</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>hi,</p>
<p>I am having trouble with $(&#8216;.default-value&#8217;), I am using validationEngine plugin but still can&#8217;t figure it out that from where this $(&#8216;.default-value&#8217;) comes, I will appreciate any kind of help</p>
<p>thanks,</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: nils</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-447</link>
		<dc:creator>nils</dc:creator>
		<pubDate>Wed, 16 Mar 2011 14:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-447</guid>
		<description>Nice Job Jason :)
replace focus with onmouseover</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Nice Job Jason <img src='http://www.jason-palmer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
replace focus with onmouseover</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
	<item>
		<title>By: 在表单中设置默认值 &#187; Eric Lo</title>
		<link>http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/comment-page-1/#comment-423</link>
		<dc:creator>在表单中设置默认值 &#187; Eric Lo</dc:creator>
		<pubDate>Mon, 23 Aug 2010 13:56:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-palmer.com/?p=7#comment-423</guid>
		<description>[...] ， 找到了Form Field Default Value这篇博客， 作者写了一个jquery插件，代码如下 jQuery.fn.DefaultValue = [...]</description>
		<content:encoded><![CDATA[<!-- google_ad_section_start --><p>[...] ， 找到了Form Field Default Value这篇博客， 作者写了一个jquery插件，代码如下 jQuery.fn.DefaultValue = [...]</p>
<!-- google_ad_section_end -->]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.155 seconds -->

