From ed7ff72591fdf32ee64ff93102d5b3f39d249bf4 Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 22 Mar 2007 04:13:20 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@598 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index d543ea885..febe536a0 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -16,11 +16,18 @@ function isDef() { } // 윈도우 오픈 +var winopen_list = new Array(); function winopen(url, target, attribute) { - if(typeof(target)=='undefined') target = '_blank'; - if(typeof(attribute)=='undefined') attribute = ''; - var win = window.open(url, target, attribute); - win.focus(); + if(target != "_blank" && winopen_list[target]) { + winopen_list[target].close(); + winopen_list[target] = null; + } + + if(typeof(target)=='undefined') target = '_blank'; + if(typeof(attribute)=='undefined') attribute = ''; + var win = window.open(url, target, attribute); + win.focus(); + if(target != "_blank") winopen_list[target] = win; } // 특정 div(or span...)의 display옵션 토글