팝업창 오늘하루닫기 질문.. fyns 자기소개 회원게시물 회원 질문검색 회원 답변검색 회원 댓글검색 자기소개 회원게시물 회원 질문검색 회원 답변검색 회원 댓글검색 2014.03.25 13:05:59 조회 10656 (183.♡.♡.140) 목록 본문 팝업창을 두개 띄워서 두군대다 오늘 하루 닫기를 적용시킬려고합니다. head.sub.php 에는 아래와 같은 소스를 사용하였고 <script language="JavaScript"> <!-- function setcookie( name, value, expirehours ) { var todayDate = new Date(); todayDate.setHours( todayDate.getHours() + expirehours ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } function closeWin() { if ( document.notice_form.chkbox.checked ){ setcookie( "maindiv", "done" , 24 ); } document.all['divpop'].style.display = "none"; } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function closeWin1() { if ( document.notice_form1.chkbox1.checked1 ){ setcookie( "maindiv1", "done" , 24 ); } document.all['divpop1'].style.display = "none"; } //--> </script>Copy 팝업창이뜨는 index.php에는 아래와같이했는데.. 첫번째 팝업은 작동이되나 두번째 팝업은 작동이안됩니다.. <div id="divpop" style="width:350px; height:250px; position:absolute; left:91px; top:100px; z-index:1000; visibility:hidden; layer-background-color: #000000; border: 1px none #000000;"> <table width=200 height=282 cellpadding=1 cellspacing=1> <form name="notice_form"> <tr> <td align=right><table width="220" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="199" height="22" background="images/popup_btn.png"><div align="center"> <input type="checkbox" name="chkbox" value="" /> <span class="style3 style1">오늘 이 창을 열지않음 <a href="javascript:closeWin();"><b>[닫기]</b></a> </span></div></td> <td> </td> </tr> </table></td> </tr> <tr> <td align=center><a href="javascript:closeWin();"><img src='images/popup_02.png' border='0' usemap="#popup" /></a></td> </tr> </form> </table> </div> <div id="apDiv1"></div> <script language="Javascript"> cookiedata = document.cookie; if ( cookiedata.indexOf("maindiv=done") < 0 ){ document.all['divpop'].style.visibility = "visible"; } else { document.all['divpop'].style.visibility = "hidden"; } </script> <div id="divpop1" style="width:350px; height:250px; position:absolute; left:571px; top:100px; z-index:1000; visibility:hidden; layer-background-color: #000000; border: 1px none #000000;"> <table width=200 height=282 cellpadding=1 cellspacing=1> <form name="notice_form1"> <tr> <td align=right><table width="220" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="199" height="22" background="images/popup_btn1.png"><div align="center"> <input type="checkbox" name="chkbox1" value="" /> <span class="style3 style1">오늘 이 창을 열지않음 <a href="javascript:closeWin1();"><b>[닫기]</b></a> </span></div></td> <td> </td> </tr> </table></td> </tr> <tr> <td align=center><a href="javascript:closeWin1();"><img src='images/popup_03.png' border='0' usemap="#popup" /></a></td> </tr> </form> </table> </div> <div id="apDiv2"></div> <script language="Javascript"> cookiedata1 = document.cookie; if ( cookiedata1.indexOf("maindiv1=done") < 0 ){ document.all['divpop1'].style.visibility = "visible"; } else { document.all['divpop1'].style.visibility = "hidden"; } </script>Copy 제가 임의로 막 건들여본거라.. 어떤부분을 수정해야하는지 잘모르겠습니다.. 0 페이스북으로 공유 트위터로 공유 공유 #그누보드4 #php #javascript #html 이 질문에 댓글 쓰기 : 답변 1 좋아요순 최근순 오래된순 마젠토 홈페이지 자기소개 회원게시물 회원 질문검색 회원 답변검색 회원 댓글검색 홈페이지 자기소개 회원게시물 회원 질문검색 회원 답변검색 회원 댓글검색 님의 답변 2021-06-05 08:45:15 47.♡.♡.155 0 질문이 너무 오래되고 답변이 없어서, 필요하면 다시 질문해주세요. 댓글쓰기 주소복사 스크랩 0 답변을 작성하시기 전에 로그인 해주세요. 답변을 작성하시기 전에 로그인 해주세요.
마젠토 홈페이지 자기소개 회원게시물 회원 질문검색 회원 답변검색 회원 댓글검색 홈페이지 자기소개 회원게시물 회원 질문검색 회원 답변검색 회원 댓글검색 님의 답변 2021-06-05 08:45:15 47.♡.♡.155 0 질문이 너무 오래되고 답변이 없어서, 필요하면 다시 질문해주세요. 댓글쓰기 주소복사 스크랩 0