<% if @submit_result%> $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>'); showModal('ajax-modal', '500px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); $('#ajax-modal').parent().css("top","").css("left",""); $('#ajax-modal').parent().addClass("anonymos"); <% else %> window.location.href = '<%= edit_student_work_url(@work)%>'; <% end %> function clickCanel() { hideModal('#popbox02'); window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>'; }