Setfocus to a field in view

I have a div “reason_for_transfer_search_sd” like

<%= render :partial => "service_desk_part/on_action_transfer_reason_sd_search", :locals => { :sd_ticket=>sd_ticket } %>

And in on_action_transfer_reason_sd_search
<%= text_area_tag “transfer_reason”, nil, :size => “50x1” %>
<%= link_to_remote “Submit”,
{:with => “‘transfer_reason=’ + $(‘transfer_reason’).value”,
:url => { :controller => :service_desk,:action =>
:sd_id =>,
} },

So to focus cursor to this textarea I used
<%= set_focus_to_id ‘transfer_reason’ %> just below that and it is
working properly. And in appliation helper
def set_focus_to_id(id)
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