Hi I have a div "reason_for_transfer_search_sd" like <div id="reason_for_transfer_search_sd" > <%= render :partial => "service_desk_part/on_action_transfer_reason_sd_search", :locals => { :sd_ticket=>sd_ticket } %> </div> 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 => :edit_service_desk_status_after_transfer_from_search_sd, :sd_id => sd_ticket.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) 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---