<?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: Setting Focus in Rails with Prototype</title>
	<atom:link href="http://neoarch.wordpress.com/2008/02/29/setting-focus-in-rails-with-prototype/feed/" rel="self" type="application/rss+xml" />
	<link>http://neoarch.wordpress.com/2008/02/29/setting-focus-in-rails-with-prototype/</link>
	<description>What's past is prologue; what's present is weblog</description>
	<pubDate>Sun, 06 Jul 2008 11:20:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: sijo</title>
		<link>http://neoarch.wordpress.com/2008/02/29/setting-focus-in-rails-with-prototype/#comment-12028</link>
		<dc:creator>sijo</dc:creator>
		<pubDate>Mon, 26 May 2008 08:36:41 +0000</pubDate>
		<guid isPermaLink="false">http://neoarch.wordpress.com/?p=188#comment-12028</guid>
		<description>Hi
   I have a div "reason_for_transfer_search_sd" like


"service_desk_part/on_action_transfer_reason_sd_search", :locals =&#62; {:sd_ticket=&#62;sd_ticket } %&#62;


And in on_action_transfer_reason_sd_search
 "50x1" %&#62;
 "'transfer_reason=' + $('transfer_reason').value",
     :url =&#62; { :controller =&#62; :service_desk,:action =&#62;
:edit_service_desk_status_after_transfer_from_search_sd,
                                :sd_id =&#62; sd_ticket.id,
                 } },
   %&#62;

So to focus cursor to this textarea I used
 just below that and it is
working properly. And in appliation helper
def set_focus_to_id(id)
      javascript_tag("$('#{id}').focus()");
end
    But my problem is i am replacing the same div from the controller after processing using rjs..But this time cursor focus does not goes to text area.What might be the reason?

Thanks in advance
Sijo</description>
		<content:encoded><![CDATA[<p>Hi<br />
   I have a div &#8220;reason_for_transfer_search_sd&#8221; like</p>
<p>&#8220;service_desk_part/on_action_transfer_reason_sd_search&#8221;, :locals =&gt; {:sd_ticket=&gt;sd_ticket } %&gt;</p>
<p>And in on_action_transfer_reason_sd_search<br />
 &#8220;50&#215;1&#8243; %&gt;<br />
 &#8220;&#8216;transfer_reason=&#8217; + $(&#8217;transfer_reason&#8217;).value&#8221;,<br />
     :url =&gt; { :controller =&gt; :service_desk,:action =&gt;<br />
:edit_service_desk_status_after_transfer_from_search_sd,<br />
                                :sd_id =&gt; sd_ticket.id,<br />
                 } },<br />
   %&gt;</p>
<p>So to focus cursor to this textarea I used<br />
 just below that and it is<br />
working properly. And in appliation helper<br />
def set_focus_to_id(id)<br />
      javascript_tag(&#8221;$(&#8217;#{id}&#8217;).focus()&#8221;);<br />
end<br />
    But my problem is i am replacing the same div from the controller after processing using rjs..But this time cursor focus does not goes to text area.What might be the reason?</p>
<p>Thanks in advance<br />
Sijo</p>
]]></content:encoded>
	</item>
</channel>
</rss>
