Most of my js.erb files contains something like this at the bottom:
$(\"#flash_message\").html(\"<%= escape_javascript(content_tag(:p, flash[:note], :class =&
<%= render :partial => 'common' %>, perhaps?
<%= render :partial => 'common' %>
http://api.rubyonrails.org/classes/ActionController/Base.html#M000633