<?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 for 3DM Design</title>
	<atom:link href="http://dev-journal.3dmdesign.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://dev-journal.3dmdesign.com</link>
	<description>JavaScript and Ruby on Rails Application Development Journal</description>
	<pubDate>Sat, 19 Jul 2008 23:39:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Comment on The Scriptaculous afterFinish problem by Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/javascript/scriptaculous-afterfinish-problem#comment-4232</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Fri, 04 Jul 2008 12:45:35 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/scriptaculous-afterfinish-problem#comment-4232</guid>
		<description>Ah... yep; previously I failed to see in your first example that your code was actually calling alert immediately, rather than wrapping it in an anonymous function like so:

&lt;code&gt;Effect.toggle(boxID, ’slide’, { afterFinish: function(){ alert($(’parent’).getHeight()); } });&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Ah&#8230; yep; previously I failed to see in your first example that your code was actually calling alert immediately, rather than wrapping it in an anonymous function like so:</p>
<p><code>Effect.toggle(boxID, ’slide’, { afterFinish: function(){ alert($(’parent’).getHeight()); } });</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Scriptaculous afterFinish problem by Dan</title>
		<link>http://dev-journal.3dmdesign.com/javascript/scriptaculous-afterfinish-problem#comment-4190</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sat, 21 Jun 2008 15:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/scriptaculous-afterfinish-problem#comment-4190</guid>
		<description>Hi, n I didn't need to go that far, I simply defined the function as a variable and passed it to the toggle constructor:

var mycallback = function() {
  alert("it now works!");
};

Effect.toggle(boxID, 'slide', { afterFinish:mycallback });

This worked fine, probably a slightly different problem (like me not doing it right) than the squish problem, but thanks for the reply nevertheless =)</description>
		<content:encoded><![CDATA[<p>Hi, n I didn&#8217;t need to go that far, I simply defined the function as a variable and passed it to the toggle constructor:</p>
<p>var mycallback = function() {<br />
  alert(&#8221;it now works!&#8221;);<br />
};</p>
<p>Effect.toggle(boxID, &#8217;slide&#8217;, { afterFinish:mycallback });</p>
<p>This worked fine, probably a slightly different problem (like me not doing it right) than the squish problem, but thanks for the reply nevertheless =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Scriptaculous afterFinish problem by Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/javascript/scriptaculous-afterfinish-problem#comment-4189</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Fri, 20 Jun 2008 22:34:08 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/scriptaculous-afterfinish-problem#comment-4189</guid>
		<description>Did you try the &lt;a href="/javascript/effect-squish-callback-fix" rel="nofollow"&gt;callback fix&lt;/a&gt;? I discovered the link in the post was broken and have updated it as well.

Let me know if that solution works for you.</description>
		<content:encoded><![CDATA[<p>Did you try the <a href="/javascript/effect-squish-callback-fix" rel="nofollow">callback fix</a>? I discovered the link in the post was broken and have updated it as well.</p>
<p>Let me know if that solution works for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Scriptaculous afterFinish problem by Dan</title>
		<link>http://dev-journal.3dmdesign.com/javascript/scriptaculous-afterfinish-problem#comment-4182</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Thu, 19 Jun 2008 11:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/scriptaculous-afterfinish-problem#comment-4182</guid>
		<description>Hello, any luck with this? Appreciate this post is old but I'm using Effect.toggle and I need to call a function when it finishes. I've used:

  Effect.toggle(boxID, 'slide', { afterFinish:alert($('parent').getHeight()) });

But the alert appears before the effect finishes...</description>
		<content:encoded><![CDATA[<p>Hello, any luck with this? Appreciate this post is old but I&#8217;m using Effect.toggle and I need to call a function when it finishes. I&#8217;ve used:</p>
<p>  Effect.toggle(boxID, &#8217;slide&#8217;, { afterFinish:alert($(&#8217;parent&#8217;).getHeight()) });</p>
<p>But the alert appears before the effect finishes&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Comet for Web Games by Web Games and Something Called Comet - Gaming News &#38; Views - Pair O&#8217; Dice Games</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/comet-for-web-games#comment-3608</link>
		<dc:creator>Web Games and Something Called Comet - Gaming News &#38; Views - Pair O&#8217; Dice Games</dc:creator>
		<pubDate>Fri, 14 Mar 2008 03:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://dev-journal.3dmdesign.com/rails-application-development/comet-for-web-games#comment-3608</guid>
		<description>[...] the technically inclined, I have a few more details over at my programming blog. For everyone else, let me express my enthusiasm a bit more [...]</description>
		<content:encoded><![CDATA[<p>[...] the technically inclined, I have a few more details over at my programming blog. For everyone else, let me express my enthusiasm a bit more [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript Check All Checkboxes by Hello my name is&#8230; &#187; JavaScript: Check All of your CheckBoxes&#8230;</title>
		<link>http://dev-journal.3dmdesign.com/javascript/javascript-check-all-checkboxes#comment-2296</link>
		<dc:creator>Hello my name is&#8230; &#187; JavaScript: Check All of your CheckBoxes&#8230;</dc:creator>
		<pubDate>Wed, 15 Aug 2007 19:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/javascript-check-all-checkboxes#comment-2296</guid>
		<description>[...] found a very interesting and useful piece of code at 3DM Design which allows you to select all checkboxes on a webpage. I found this particularly useful for a [...]</description>
		<content:encoded><![CDATA[<p>[...] found a very interesting and useful piece of code at 3DM Design which allows you to select all checkboxes on a webpage. I found this particularly useful for a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Displaying a hierarchy and acts_as_tree by Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/displaying-a-hierarchy-and-acts_as_tree#comment-2179</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Sat, 04 Aug 2007 18:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/displaying-a-hierarchy-and-acts_as_tree#comment-2179</guid>
		<description>I agree, Anthony.

The moment I come across a clean and elegant way to display the tree, I'm sure I'll post about it.

In the meantime, with my current project I've moved away from a design involving displaying multiple levels/branches of a hierarchy all at once. I may revisit that concept, though right now I'm feeling good about the decision to start with everything collapsed and fetch a single level when an item is expanded.

I suppose I won't know whether it's truly more responsive to load an entire tree up front until I do some testing; both methods have trade-offs but the one-level-at-a-time display is simpler to implement.</description>
		<content:encoded><![CDATA[<p>I agree, Anthony.</p>
<p>The moment I come across a clean and elegant way to display the tree, I&#8217;m sure I&#8217;ll post about it.</p>
<p>In the meantime, with my current project I&#8217;ve moved away from a design involving displaying multiple levels/branches of a hierarchy all at once. I may revisit that concept, though right now I&#8217;m feeling good about the decision to start with everything collapsed and fetch a single level when an item is expanded.</p>
<p>I suppose I won&#8217;t know whether it&#8217;s truly more responsive to load an entire tree up front until I do some testing; both methods have trade-offs but the one-level-at-a-time display is simpler to implement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scriptaculous Effect.Squish afterFinish callback fix by Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/javascript/effect-squish-callback-fix#comment-2178</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Sat, 04 Aug 2007 18:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/effect-squish-callback-fix#comment-2178</guid>
		<description>Chris-

My first suggestion would be to check your parentheses and brackets carefully. Since I wrote the above fix, the formatting of Effect.Squish code in Scriptaculous seems to have changed a bit.

Upgrading to the current script.aculo.us 1.7.0 this morning, then applying the Object.extend fix above, I was able to get afterFinish to fire after Effect.Squish completed.

Though it may be worth noting that, unlike Squish, Effect.Fold still fires afterFinish just before the element is completely gone.

The other suggestion I can offer is to check your callbacks with simple alert() calls; I say this as the modal alert dialogs essentially freeze script execution while they're up, and it might be a bit easier to pinpoint when the callback is firing.

Hope that helps!</description>
		<content:encoded><![CDATA[<p>Chris-</p>
<p>My first suggestion would be to check your parentheses and brackets carefully. Since I wrote the above fix, the formatting of Effect.Squish code in Scriptaculous seems to have changed a bit.</p>
<p>Upgrading to the current script.aculo.us 1.7.0 this morning, then applying the Object.extend fix above, I was able to get afterFinish to fire after Effect.Squish completed.</p>
<p>Though it may be worth noting that, unlike Squish, Effect.Fold still fires afterFinish just before the element is completely gone.</p>
<p>The other suggestion I can offer is to check your callbacks with simple alert() calls; I say this as the modal alert dialogs essentially freeze script execution while they&#8217;re up, and it might be a bit easier to pinpoint when the callback is firing.</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scriptaculous Effect.Squish afterFinish callback fix by Chris</title>
		<link>http://dev-journal.3dmdesign.com/javascript/effect-squish-callback-fix#comment-2155</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 02 Aug 2007 17:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/effect-squish-callback-fix#comment-2155</guid>
		<description>I've tried your fix, but it still doesn't work for me.  My afterFinish function call is executed before my effect is finished (in this case Squish as you exampled).

:(</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried your fix, but it still doesn&#8217;t work for me.  My afterFinish function call is executed before my effect is finished (in this case Squish as you exampled).</p>
<p>:(</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Displaying a hierarchy and acts_as_tree by Anthony ETtinger</title>
		<link>http://dev-journal.3dmdesign.com/rails-application-development/displaying-a-hierarchy-and-acts_as_tree#comment-2150</link>
		<dc:creator>Anthony ETtinger</dc:creator>
		<pubDate>Thu, 02 Aug 2007 07:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/rails-application-development/displaying-a-hierarchy-and-acts_as_tree#comment-2150</guid>
		<description>I'm leary of hardcoding HTML into my helper...I'm sure there is probably an easy way to do this, to get the entire tree and walk it...but I have not discovered it yet.</description>
		<content:encoded><![CDATA[<p>I&#8217;m leary of hardcoding HTML into my helper&#8230;I&#8217;m sure there is probably an easy way to do this, to get the entire tree and walk it&#8230;but I have not discovered it yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript Check All Checkboxes by Scott - 3DM Design</title>
		<link>http://dev-journal.3dmdesign.com/javascript/javascript-check-all-checkboxes#comment-1930</link>
		<dc:creator>Scott - 3DM Design</dc:creator>
		<pubDate>Mon, 16 Jul 2007 02:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/javascript-check-all-checkboxes#comment-1930</guid>
		<description>You're welcome Eric! Good to know someone else out there is able to find this useful.</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome Eric! Good to know someone else out there is able to find this useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript Check All Checkboxes by Eric</title>
		<link>http://dev-journal.3dmdesign.com/javascript/javascript-check-all-checkboxes#comment-1906</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 13 Jul 2007 21:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://3dmdesign.com/dev-journal/javascript/javascript-check-all-checkboxes#comment-1906</guid>
		<description>Thanks for the script!  I was trying to figure out how to do something like this, and seeing your example solved the problem I was having.</description>
		<content:encoded><![CDATA[<p>Thanks for the script!  I was trying to figure out how to do something like this, and seeing your example solved the problem I was having.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Q&#038;A: How to Set a Form&#8217;s ID in Rails? 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>Comment on Q&#038;A: How to Set a Form&#8217;s ID in Rails? 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>Comment on Q&#038;A: How to Set a Form&#8217;s ID in Rails? 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>Comment on Q&#038;A: How to Set a Form&#8217;s ID in Rails? 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>Comment on Q&#038;A: How to Set a Form&#8217;s ID in Rails? 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>
