/* * * NLIB 공통 JavaScript * * */ // 팝업으로 비밀번호를 입력받아서 콜백함수에 전달한다. function fn_promptPassword(msg, placeholder, callbackFucName) { var options = "top=200, left=200, width=300, height=200, status=no, menubar=no, toolbar=yes, resizable=no"; var thePrompt = window.open("", "_NLIB_POMPT_PASSWORD", options); var theHTML = "" + placeholder + ""; theHTML += "

" + msg + "

"; theHTML += "
"; theHTML += "비밀번호: "; theHTML += " 
"; theHTML += " 
"; theHTML += ""; theHTML += ""; theHTML += ""; thePrompt.document.body.innerHTML = theHTML; } /** * ID를 name 으로 하는 객체의 값을 숫자(10진수)로 변환하여 리턴한다. * 값이 적절하지 않은 경우, defaultValue를 리턴한다. * * @param name * @param defaultValue * @returns */ function fn_getIntValue(name, defaultValue) { var val = $("#" + name).val(); try { return parseInt(val, 10); } catch(error) { console.error(error); return defaultValue; } } function openPopup(url, popName, width, height) { var options = "top=10, left=10, width=" + (width?width:600) + ", height=" + (height?height:600) + ", status=no, menubar=no, toolbar=yes, resizable=no"; window.open(url, popName, options); }