<?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 form Plugin and Return Key Submit</title>
	<atom:link href="http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/</link>
	<description>My thoughts on ColdFusion, Flex and other RIA stuff....</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:21:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-6615</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Fri, 18 Feb 2011 05:55:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-6615</guid>
		<description>Thanks for the tip, Karl.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, Karl.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-6596</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Wed, 16 Feb 2011 06:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-6596</guid>
		<description>Thanks for the suggestion though. I think instead of using the ajaxSubmit(), if you just use ajaxForm() , that handles this as well.
 &lt;a href=&quot;http://blog.abugfreemind.com/&quot; rel=&quot;nofollow&quot;&gt;how to change your life&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for the suggestion though. I think instead of using the ajaxSubmit(), if you just use ajaxForm() , that handles this as well.<br />
 <a href="http://blog.abugfreemind.com/" rel="nofollow">how to change your life</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mujtaba</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3366</link>
		<dc:creator>Mujtaba</dc:creator>
		<pubDate>Thu, 04 Jun 2009 13:16:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3366</guid>
		<description>hi!!!
I am also using the form plugin for a contact form for my upcoming site...
Today i ran into a problem which has left me exhausted and searching for help...
Since my form is dynamically added i am binding the ajaxForm to my form using live()
here is the code:
$(&quot;#submit-button&quot;).live(&quot;click&quot;,function(){
$(&quot;#form&quot;).ajaxForm(options);
});
i am using beforeSubmit and Success to alert mesages stating &quot;about to submit&quot; and &quot;submitted successfully&quot; and the target value is set to #status
but the problem is , when the submit button is clicked for the first time i get both the messages from beforeSubmit and success, but nothing is sent to the server script and my status div becomes empty!!! But when u click the submit button second time it works!!! I&#039;ve tried everything...I even tried ajaxSubmit instead of ajaxForm but that only messes up more!!!
Can u give any suggestions??? Plz.</description>
		<content:encoded><![CDATA[<p>hi!!!<br />
I am also using the form plugin for a contact form for my upcoming site&#8230;<br />
Today i ran into a problem which has left me exhausted and searching for help&#8230;<br />
Since my form is dynamically added i am binding the ajaxForm to my form using live()<br />
here is the code:<br />
$(&#8220;#submit-button&#8221;).live(&#8220;click&#8221;,function(){<br />
$(&#8220;#form&#8221;).ajaxForm(options);<br />
});<br />
i am using beforeSubmit and Success to alert mesages stating &#8220;about to submit&#8221; and &#8220;submitted successfully&#8221; and the target value is set to #status<br />
but the problem is , when the submit button is clicked for the first time i get both the messages from beforeSubmit and success, but nothing is sent to the server script and my status div becomes empty!!! But when u click the submit button second time it works!!! I&#8217;ve tried everything&#8230;I even tried ajaxSubmit instead of ajaxForm but that only messes up more!!!<br />
Can u give any suggestions??? Plz.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3307</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3307</guid>
		<description>Hey, I didnt know we were fighting:)

And yes, I agree to your alternative. It kinda makes sense to let anything trigger form submit and then the submit handler to worry about ajaxSubmit(). I could change that in my code.</description>
		<content:encoded><![CDATA[<p>Hey, I didnt know we were fighting:)</p>
<p>And yes, I agree to your alternative. It kinda makes sense to let anything trigger form submit and then the submit handler to worry about ajaxSubmit(). I could change that in my code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Rafferty</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3306</link>
		<dc:creator>Todd Rafferty</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3306</guid>
		<description>Understood, but back up a sec. Let the buttons/links/images worry about submit() and let form submit() worry about ajaxSubmit(). 

Instead of trying to focus on what could possibly trigger the ajaxSubmit(), let the form worry about it. Your forms will be much more flexible if you do.

I guess that&#039;s my .02 cents. I wasn&#039;t trying to pick a fight or anything.  You solved your issue, I was just trying to present another option.</description>
		<content:encoded><![CDATA[<p>Understood, but back up a sec. Let the buttons/links/images worry about submit() and let form submit() worry about ajaxSubmit(). </p>
<p>Instead of trying to focus on what could possibly trigger the ajaxSubmit(), let the form worry about it. Your forms will be much more flexible if you do.</p>
<p>I guess that&#8217;s my .02 cents. I wasn&#8217;t trying to pick a fight or anything.  You solved your issue, I was just trying to present another option.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3305</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3305</guid>
		<description>Thats exactly what I did in my example , Todd.

$(&#039;.btnLogin&#039;).click(function(){
$(&#039;.frmLogin&#039;).ajaxSubmit(options);
return false; // prevent default behaviour
});

However, what you are suggesting would mean I will have to do the above and the .submit() binding as well. which is the same as the extra step of listening to the enter key, I think.

Thanks for the suggestion though. I think instead of using the ajaxSubmit(), if you just use ajaxForm() , that handles this as well. That just doesnt fit my situation as I have to validate before submit as well.</description>
		<content:encoded><![CDATA[<p>Thats exactly what I did in my example , Todd.</p>
<p>$(&#8216;.btnLogin&#8217;).click(function(){<br />
$(&#8216;.frmLogin&#8217;).ajaxSubmit(options);<br />
return false; // prevent default behaviour<br />
});</p>
<p>However, what you are suggesting would mean I will have to do the above and the .submit() binding as well. which is the same as the extra step of listening to the enter key, I think.</p>
<p>Thanks for the suggestion though. I think instead of using the ajaxSubmit(), if you just use ajaxForm() , that handles this as well. That just doesnt fit my situation as I have to validate before submit as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Rafferty</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3304</link>
		<dc:creator>Todd Rafferty</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3304</guid>
		<description>... Uh, you could $(&#039;img .class&#039;).click(function(){ $(&#039;#myform&#039;).submit(); }); ?  You can make anything can trigger a form. You can make a link trigger a form.

That&#039;s not what I was trying to help you with. I was trying to let you know that you don&#039;t need to capture the &quot;enter&quot; key because all you care about is the attempt to submit a form.</description>
		<content:encoded><![CDATA[<p>&#8230; Uh, you could $(&#8216;img .class&#8217;).click(function(){ $(&#8216;#myform&#8217;).submit(); }); ?  You can make anything can trigger a form. You can make a link trigger a form.</p>
<p>That&#8217;s not what I was trying to help you with. I was trying to let you know that you don&#8217;t need to capture the &#8220;enter&#8221; key because all you care about is the attempt to submit a form.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3303</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:38:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3303</guid>
		<description>Ok, but how would the form submit be triggered on the click of an Image? unless I had input type=&#039;image&#039; ...it wont...</description>
		<content:encoded><![CDATA[<p>Ok, but how would the form submit be triggered on the click of an Image? unless I had input type=&#8217;image&#8217; &#8230;it wont&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Rafferty</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3302</link>
		<dc:creator>Todd Rafferty</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:32:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3302</guid>
		<description>No, you&#039;re missing my point. Regardless of what triggers the submit, all you care is that the form was submitted.

That&#039;s what the code catches.  Image, Button, Enter Key... it doesn&#039;t care other than the fact that the form was submitted. Only issue then would be is if javascript was turned off.</description>
		<content:encoded><![CDATA[<p>No, you&#8217;re missing my point. Regardless of what triggers the submit, all you care is that the form was submitted.</p>
<p>That&#8217;s what the code catches.  Image, Button, Enter Key&#8230; it doesn&#8217;t care other than the fact that the form was submitted. Only issue then would be is if javascript was turned off.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/16/jquery-form-plugin-and-return-key-submit/comment-page-1/#comment-3301</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Fri, 17 Apr 2009 08:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=418#comment-3301</guid>
		<description>@Todd, that would work if I had a submit button in my form. I have an image which needs to trigger the form submit on click.</description>
		<content:encoded><![CDATA[<p>@Todd, that would work if I had a submit button in my form. I have an image which needs to trigger the form submit on click.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

