팝업창 오늘하루 안보기 하면 네모 테두리가 남네요 정보
팝업창 오늘하루 안보기 하면 네모 테두리가 남네요본문
<script language="JavaScript">
<!--
function setCookie( name, value, expiredays ) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
//-->
</script>
<?
$now = date("Ymd");
$sql_common = " from g4_popup ";
$dbqry_popup="
SELECT *
$sql_common
WHERE pop_use = '1' AND ((start_date <= '$now') && (end_date >= '$now'))
";
$rs_popup=sql_query($dbqry_popup);
for ($i=0; $row=sql_fetch_array($rs_popup); $i++) {
?>
<!-- POPUP -->
<div id="divpopup_<?=$row[pop_id]?>" style="position:absolute;left:<?=$row[popposition_left]?>px;top:<?=$row[popposition_top]?>;width:<?=$row[popsize_width]+1?>;z-index:100;visibility:hidden;border:1px #D7D7D7 solid;">
<iframe src="about:blank" mce_src="about:blank" scrolling="no" frameborder="0" style="position:absolute;width:<?=$row[popsize_width]-1?>px;height:<?=$row[popsize_height]-1?>px;top:1px;left:1px;z-index:50;border:none;display:block"></iframe>
<table id="popuptable_<?=$row[pop_id]?>" width="<?=$row[popsize_width]?>" align="center" border="0" cellpadding="0" cellspacing="0" style="word-break:break-all;table-layout:fixed;">
<tr>
<td style="border:1px #333333 solid" height='<?=$row[popsize_height]-1?>' valign=top bgcolor=white>
<div style="position:absolute;top:expression(eval(popuptable_<?=$row[pop_id]?>.offsetTop)+0);left:expression(eval(popuptable_<?=$row[pop_id]?>.offsetLeft)+0);width:<?=$row[popsize_width]-1?>;height:<?=$row[popsize_height]-1?>;z-index:110;word-break:break-all;table-layout:fixed;">
<?=$row[bn_content]?>
</div>
</td>
</tr>
<tr height=25>
<form name="notice_form_<?=$row[pop_id]?>">
<td valign=middle align=right bgcolor=white>
<input type="checkbox" name="chkbox_<?=$row[pop_id]?>" value="checkbox">오늘 하루 이 창을 열지 않음 <a href="javascript:closeWin_<?=$row[pop_id]?>();"><img src="./img/close.gif" border="0" align="absmiddle"></a>
</td>
</form>
</tr>
</table>
</div>
<?
}
?>
<script language="Javascript">
bn_cookiedata = document.cookie;
<?
$rs_popup=sql_query($dbqry_popup);
for ($i=0; $row=sql_fetch_array($rs_popup); $i++) {
?>
if ( bn_cookiedata.indexOf("maindiv_<?=$row[pop_id]?>=done") < 0 ){
document.all['divpopup_<?=$row[pop_id]?>'].style.visibility = "visible";
}
else {
document.all['divpopup_<?=$row[pop_id]?>'].style.visibility = "hidden";
}
function closeWin_<?=$row[pop_id]?>() {
if ( document.notice_form_<?=$row[pop_id]?>.chkbox_<?=$row[pop_id]?>.checked ){
setCookie( "maindiv_<?=$row[pop_id]?>", "done" , 1 );
}
document.all['divpopup_<?=$row[pop_id]?>'].style.visibility = "hidden";
}
<?} ?>
</script>
어디 잘못된 부분이 있는걸까요
다 정상적으로 작동하는데 오늘 하루 안보기를 체크하게되면 네모 테두리만 자리에 남습니다.
사이즈도 제가 원래 설정한 사이즈와 다르구요...
좀 봐주시면 감사하겠습니다.
<!--
function setCookie( name, value, expiredays ) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
//-->
</script>
<?
$now = date("Ymd");
$sql_common = " from g4_popup ";
$dbqry_popup="
SELECT *
$sql_common
WHERE pop_use = '1' AND ((start_date <= '$now') && (end_date >= '$now'))
";
$rs_popup=sql_query($dbqry_popup);
for ($i=0; $row=sql_fetch_array($rs_popup); $i++) {
?>
<!-- POPUP -->
<div id="divpopup_<?=$row[pop_id]?>" style="position:absolute;left:<?=$row[popposition_left]?>px;top:<?=$row[popposition_top]?>;width:<?=$row[popsize_width]+1?>;z-index:100;visibility:hidden;border:1px #D7D7D7 solid;">
<iframe src="about:blank" mce_src="about:blank" scrolling="no" frameborder="0" style="position:absolute;width:<?=$row[popsize_width]-1?>px;height:<?=$row[popsize_height]-1?>px;top:1px;left:1px;z-index:50;border:none;display:block"></iframe>
<table id="popuptable_<?=$row[pop_id]?>" width="<?=$row[popsize_width]?>" align="center" border="0" cellpadding="0" cellspacing="0" style="word-break:break-all;table-layout:fixed;">
<tr>
<td style="border:1px #333333 solid" height='<?=$row[popsize_height]-1?>' valign=top bgcolor=white>
<div style="position:absolute;top:expression(eval(popuptable_<?=$row[pop_id]?>.offsetTop)+0);left:expression(eval(popuptable_<?=$row[pop_id]?>.offsetLeft)+0);width:<?=$row[popsize_width]-1?>;height:<?=$row[popsize_height]-1?>;z-index:110;word-break:break-all;table-layout:fixed;">
<?=$row[bn_content]?>
</div>
</td>
</tr>
<tr height=25>
<form name="notice_form_<?=$row[pop_id]?>">
<td valign=middle align=right bgcolor=white>
<input type="checkbox" name="chkbox_<?=$row[pop_id]?>" value="checkbox">오늘 하루 이 창을 열지 않음 <a href="javascript:closeWin_<?=$row[pop_id]?>();"><img src="./img/close.gif" border="0" align="absmiddle"></a>
</td>
</form>
</tr>
</table>
</div>
<?
}
?>
<script language="Javascript">
bn_cookiedata = document.cookie;
<?
$rs_popup=sql_query($dbqry_popup);
for ($i=0; $row=sql_fetch_array($rs_popup); $i++) {
?>
if ( bn_cookiedata.indexOf("maindiv_<?=$row[pop_id]?>=done") < 0 ){
document.all['divpopup_<?=$row[pop_id]?>'].style.visibility = "visible";
}
else {
document.all['divpopup_<?=$row[pop_id]?>'].style.visibility = "hidden";
}
function closeWin_<?=$row[pop_id]?>() {
if ( document.notice_form_<?=$row[pop_id]?>.chkbox_<?=$row[pop_id]?>.checked ){
setCookie( "maindiv_<?=$row[pop_id]?>", "done" , 1 );
}
document.all['divpopup_<?=$row[pop_id]?>'].style.visibility = "hidden";
}
<?} ?>
</script>
어디 잘못된 부분이 있는걸까요
다 정상적으로 작동하는데 오늘 하루 안보기를 체크하게되면 네모 테두리만 자리에 남습니다.
사이즈도 제가 원래 설정한 사이즈와 다르구요...
좀 봐주시면 감사하겠습니다.
댓글 전체