<% if @flash_message %>
    alert("<%= @flash_message %>");
<% else%>
    $("#applied_project_<%= @applied_message.id %>").html('<%= escape_javascript(render :partial => 'users/applied_project_content', :locals => {:ma => @applied_message}) %>');
<% end%>
