<?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"
	>
<channel>
	<title>Comments on: Q&#038;A: How to Set a Form&#8217;s ID in Rails?</title>
	<atom:link href="http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails/feed" rel="self" type="application/rss+xml" />
	<link>http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails</link>
	<description>JavaScript and Ruby on Rails Application Development Journal</description>
	<pubDate>Thu, 28 Aug 2008 04:56:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Alex</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails#comment-833</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 25 Apr 2007 08:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/qa-how-to-set-form-id-in-rails#comment-833</guid>
		<description>Thank You</description>
		<content:encoded><![CDATA[<p>Thank You</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails#comment-169</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Tue, 27 Feb 2007 01:52:34 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/qa-how-to-set-form-id-in-rails#comment-169</guid>
		<description>You're welcome, glad you found it useful Jonathon!</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome, glad you found it useful Jonathon!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathon Wolfe</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails#comment-153</link>
		<dc:creator>Jonathon Wolfe</dc:creator>
		<pubDate>Sat, 24 Feb 2007 18:41:20 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/qa-how-to-set-form-id-in-rails#comment-153</guid>
		<description>Thanks! This really helped me. My book doesn't mention the :html hash either.</description>
		<content:encoded><![CDATA[<p>Thanks! This really helped me. My book doesn&#8217;t mention the :html hash either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails#comment-13</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Sat, 27 Jan 2007 23:34:49 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/qa-how-to-set-form-id-in-rails#comment-13</guid>
		<description>Jen:

With a standard form you can do this:

&lt;code&gt;&#60;%= form_tag({ :action =&#62; :create }, { :onsubmit =&#62; '&lt;em&gt;function call&lt;/em&gt;&#39; }) %&#62;&lt;/code&gt;

However you probably noticed that if you try using &lt;strong&gt;:onsubmit&lt;/strong&gt; with &lt;strong&gt;form_remote_tag()&lt;/strong&gt;, your event handler gets replaced with the Ajax handler set up by Rails.

One option for Ajax may be to use the &lt;strong&gt;:before&lt;/strong&gt; callback, which should allow you to call a function before the request is made. I haven't tested it, but that may be what you're looking for.</description>
		<content:encoded><![CDATA[<p>Jen:</p>
<p>With a standard form you can do this:</p>
<p><code>&lt;%= form_tag({ :action =&gt; :create }, { :onsubmit =&gt; '<em>function call</em>&#39; }) %&gt;</code></p>
<p>However you probably noticed that if you try using <strong>:onsubmit</strong> with <strong>form_remote_tag()</strong>, your event handler gets replaced with the Ajax handler set up by Rails.</p>
<p>One option for Ajax may be to use the <strong>:before</strong> callback, which should allow you to call a function before the request is made. I haven&#8217;t tested it, but that may be what you&#8217;re looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jennifer</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/qa-how-to-set-form-id-in-rails#comment-12</link>
		<dc:creator>jennifer</dc:creator>
		<pubDate>Fri, 26 Jan 2007 08:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/qa-how-to-set-form-id-in-rails#comment-12</guid>
		<description>i am trying to do something similar, but perhaps really wrongheaded. i want to call a javascript function on a rails submit; before the form is submitted i want to dynamically add fields and then send their values. i'd love to use an ajax remote_form_tag to generate the form. i've been looking at the html options hash also but can't find any way of doing something like :onsubmit =&#62; "call javascript function".

do you have any thoughts on this? any help would be much appreciated.

thanks,
jen</description>
		<content:encoded><![CDATA[<p>i am trying to do something similar, but perhaps really wrongheaded. i want to call a javascript function on a rails submit; before the form is submitted i want to dynamically add fields and then send their values. i&#8217;d love to use an ajax remote_form_tag to generate the form. i&#8217;ve been looking at the html options hash also but can&#8217;t find any way of doing something like :onsubmit =&gt; &#8220;call javascript function&#8221;.</p>
<p>do you have any thoughts on this? any help would be much appreciated.</p>
<p>thanks,<br />
jen</p>
]]></content:encoded>
	</item>
</channel>
</rss>
