묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
하루동안 안열리게하는 팝업창이 체크해도 계속 열리네요
2006.08.10 17:48
하루동안 안열리게하는 팝업창이 체크해도 계속 열리네요.
고수님들 부탁드립니다.
부모창에 넣은소스
<head>
<script language="javascript">
function getCookie(name) {
var Found = false
var start, end
var i = 0
while(i <= document.cookie.length) {
start = i
end = start + name.length
if(document.cookie.substring(start, end) == name) {
Found = true
break
}
i++
}
if(Found == true) {
start = end + 1
end = document.cookie.indexOf(";", start)
if(end < start)
end = document.cookie.length
return document.cookie.substring(start, end)
}
return ""
}
function openPopup()
{
var noticeCookie=getCookie("event");
if (noticeCookie != "no")
window.open('./popup/popup1.htm','event','width=400,height=600,top=60,left=720');
}
openPopup();
</SCRIPT>
</head>
팝업창에 넣은 소스
<head>
<script language="JavaScript">
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
todayDate.setHours(0,0,0,0);
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin() {
{
if ( document.cnjform.notice.checked )
setCookie("event", "no" , 1);
}
top.close();
}
</script>
</head>
<body>
</table>
<table width="400" height="30" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="30" valign="middle"><div align="center">
<form name="cnjform">
<div align="center">
<hr>
<input type="checkbox" name="event" cnjform>
<span class="style44">하루동안 페이지를 열지 않습니다.<br>
<br>
<a href="javascript:self.close()"><img src="../image/off.jpg" width="75" height="23" border="0"></a></span></div>
</form>
</div></td>
</tr>
</table>
</body>
고수님들 부탁드립니다.
부모창에 넣은소스
<head>
<script language="javascript">
function getCookie(name) {
var Found = false
var start, end
var i = 0
while(i <= document.cookie.length) {
start = i
end = start + name.length
if(document.cookie.substring(start, end) == name) {
Found = true
break
}
i++
}
if(Found == true) {
start = end + 1
end = document.cookie.indexOf(";", start)
if(end < start)
end = document.cookie.length
return document.cookie.substring(start, end)
}
return ""
}
function openPopup()
{
var noticeCookie=getCookie("event");
if (noticeCookie != "no")
window.open('./popup/popup1.htm','event','width=400,height=600,top=60,left=720');
}
openPopup();
</SCRIPT>
</head>
팝업창에 넣은 소스
<head>
<script language="JavaScript">
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
todayDate.setHours(0,0,0,0);
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin() {
{
if ( document.cnjform.notice.checked )
setCookie("event", "no" , 1);
}
top.close();
}
</script>
</head>
<body>
</table>
<table width="400" height="30" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="30" valign="middle"><div align="center">
<form name="cnjform">
<div align="center">
<hr>
<input type="checkbox" name="event" cnjform>
<span class="style44">하루동안 페이지를 열지 않습니다.<br>
<br>
<a href="javascript:self.close()"><img src="../image/off.jpg" width="75" height="23" border="0"></a></span></div>
</form>
</div></td>
</tr>
</table>
</body>
익스플로러 설정의 개인정보탭에 쿠키가 허용되어있는지 확인해보세요.