팝업창 크기제어 도와주세요
본문
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="/include/headHtml.jsp" %>
<script language="javascript">
function getCookiePop( name ) {
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length ) {
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
function open_win(){
if(! getCookiePop('no_subp') ) {
window.open("nowon_pop.jsp","popup","width=643, height=970, top=0, left=0, toolbar=no, location=no, directories=no, status=no, menubar=no, resizeable=no, scrollbars=no, copyhistory=no");
window.open2("nowon_pop2.jsp","popup2","width=480, height=650, top=0, left=650, toolbar=no, location=no, directories=no, status=no, menubar=no, resizeable=no, scrollbars=no, copyhistory=no");
}
}
</script>
</head>
------------------------------------------------------------------------
>>>>>요기까지 해서 제가 두개는 띄웠는데, 두번째 팝업 사이즈가 조절이 안됩니다.
>>>>>nowon_pop2.jsp 의 소스는
-------------------------------------------------------------
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="/include/headHtml.jsp" %>
<script>
function setCookiePop( name, value ) {
var expiredays = 1; //공지창 하루 안띄우기 시간. 1은 하루임
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeLayerPop(cName, chkbox, type , pName) {
if ( chkbox.checked ) {
setCookie(cName, "sp");
}
if (type == "1") {
document.getElementById(pName).style.display = "none";
document.getElementById(cName).style.visibility = "hidden";
} else {
window.close();
}
}
</script>
</head>
<body>
<div class="wrap" style="width:480px;" id="no_popp" ><a href="http://omdi.co.kr/introduce/notice/read.jsp?reqPageNo=1&no=178"></a>
<div class="no_pop" id="no_subp" style="overflow-x: hidden;">
<img src="/img/pop2_img.jpg">
<div class="close">
<p><a href="javascript:closeLayer('no_subp',getObject('nowon_pop'),'0', 'no_popp');"style="color:#fff;">[닫기]</a></p>
<span>오늘 하루 이 창을 열지 않음</span><input type="checkbox" id="nowon_pop" name="닫기" value="1" onclick="javascript:closeLayer('no_subp',getObject('nowon_pop'),'0', 'no_popp');">
</div>
</div>
</div>
</body>
---------------------------
입니다
가로 길이가 제어가 안되서 스크롤이 생깁니다,
그리고 혹시 링크거는 곳도 부탁드립니다,