팝업 소스
================== index =========================
function getCookie( 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 "";
}
if ( getCookie( "event" ) != "done" )
{
noticeWindow = window.open('링크주소','event','height=590, width=400, menubar=no, scrollbars=no, resizable=no, toolbar=no, status=no, top=100, left=100')
noticeWindow.opener = self;
}
================= pop ==================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="javascript">
<!--
function popupClose(){
setCookie("event", "done", 1000);
self.close();
}
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function linkToOpener(URL){
if (window.opener && !window.opener.closed)
window.opener.location = URL;
window.close();
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="javascript:linkToOpener('링크주소');" ><img src="이미지주소" border="0"></a></td>
</tr>
</table>
<table width="100%" height="25" bgcolor="#909090" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td align="right"><font color=#ffffff>오늘하루 열지않음</font> <input type="checkbox" onClick="popupClose();"> </td>
</tr>
</table>
</body>
</html>