window.onbeforeunload = function () {if( document.readyState == "complete"){ // self.screenTop > 9000 브라우저 닫힘try {if(changeLoginIdWindow){changeLoginIdWindow.close();}if(changePasswordWindow){changePasswordWindow.close();}if(addEmp){addEmp.close();}}catch (e) {console.log(e);}}};onbeforeunload : 브라우저가 다른곳으로 이동하거나 종료할떄 발생하는 이벤트 changeLoginIdWindow, changePasswordWindow, addEmp는 자식창의 window객체를 담고있..
window.open( url, 창제목, 옵션, replace?)ex) window.open('${pageContext.servletContext.contextPath }/admin/deleteEmp', '직원삭제', 'width=1000, height=200, location=no, scrillbars=yes') optionwidth : 팝업창 가로길이height : 팝업창 세로길이toolbar=no : 단축도구창(툴바) 표시안함menubar=no : 메뉴창(메뉴바) 표시안함location=no : 주소창 표시안함scrollbars=no : 스크롤바 표시안함status=no : 아래 상태바창 표시안함resizable=no : 창변형 하지않음fullscreen=no : 전체화면 하지않음channelmod..
let table =$('#statusTable').dataTable({ pageLength: 10, bPaginate: true, info:false, pagingType:"numbers", bLengthChange: true, lengthMenu : [ [ 3, 5, 10, -1 ], [ 3, 5, 10, "All" ] ], bAutoWidth: false, processing: true, ordering: true, serverSide: false, searching: false, scrollY: false, ajax : { "url": contextPath + "/empInfoManage/search", "type":"POST", data: { compName: compNames, workStat..
let table =$('#statusTable').dataTable({ pageLength: 10, bPaginate: true, info:false, pagingType:"numbers", bLengthChange: true, lengthMenu : [ [ 3, 5, 10, -1 ], [ 3, 5, 10, "All" ] ], bAutoWidth: false, processing: true, ordering: true, serverSide: false, searching: false, scrollY: false, ajax : { "url": contextPath + "/empInfoManage/search", "type":"POST", data: { compName: compNames, workStat..
// 팝업창 종료시점 감지하기var g_oWindow = null;var g_oInterval = null;var popup = function() { g_oWindow = window.open('url입력', '창제목'); // 0.5초 마다 감지 g_oInterval = window.setInterval(function() { try { // 창이 꺼졌는지 판단 if( g_oWindow == null || g_oWindow.closed ) { window.clearInterval(g_oInterval); g_oWindow = null; // Todo.... //..... alert('창 close'); } } catch (e) { } }, 500);};
let questionBox = function(title, message){let def = $.Deferred();$("#dialog-message").attr({title: title});$("#dialog-message p").text(message);$("#dialog-message").dialog({modal: true,buttons: {"예": function(){$(this).dialog("close");def.resolve("Yes");},"아니요": function(){$(this).dialog("close");def.resolve("No");}},});return def.promise();};def에 "YES" or "NO" 값을 저장하여 promise 객체로 전달해준다 questio..