일반 팝업창을 다시 띄우지 않는 소스

황제낙엽 2005.07.16 08:12 조회 수 : 533 추천:155

sitelink1  
sitelink2  
sitelink3  
sitelink4  
extra_vars4  
extra_vars5  
extra_vars6  

팝업창을 띄울 페이지에 들어갈 소스
 

<html>

<head>

<title> 팝업창 다시띄우지 않는 스크립트 </title>

<SCRIPT LANGUAGE = "JavaScript">

    <!--

        function change(form) {

            if (form.url.selectedIndex != 0)

                parent.location = form.url.options[form.url.selectedIndex].value

        }

        function setCookie(name, value, expiredays) {

            var todayDate = new Date();

            todayDate.setDate(todayDate.getDate() + expiredays);

            document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"

        }

        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("Notice") != "done") {

            noticeWindow =

                window.open('popup.html', 'notice', 'toolbar=no,location=no,directories=no,status=no,menubar=no,

                    scrollbars=no,resizable=no,width=400,height=200,top=100,left=80');

            noticeWindow.opener = self;

        }

    // -->

</SCRIPT>

</head>

<body></body>

</html>

 





팝업창 문서에 들어갈 소스



 

<html>

<head>

<title> 팝업창 다시띄우지 않는 스크립트</title>

 

<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() + ";"

    }

 

    function closeWin() {

        if (document.forms[0].Notice.checked)

            setCookie("Notice", "done", 1);

        self.close();

    }

  // -->

</SCRIPT>

</head>

 

<body>

 <form>

   <input type = CHECKBOX name = "Notice" value = ""/> 다시 열지 않음

   <a href = "javascript:history.onclick=closeWin()"> 닫기 </a>

 </form>

</body>

</html>

번호 제목 글쓴이 날짜 조회 수
246 브라우저의 스크롤을 따라다니는 레이어 두번째 file 황제낙엽 2002.12.20 542
245 마우스 오버시 살짝 뒤로 물러나는 듯한 링크 -_-;; 황제낙엽 2003.01.04 469
244 XP 에서 input type=text 와 input type=password 의 사이즈가 틀리게 보일때 황제낙엽 2004.08.04 516
243 아이디 생성 조건 검사 자바스크립트 모듈 황제낙엽 2004.11.18 478
242 자바스크립트 내장 함수 활용하기 황제낙엽 2005.04.25 518
» 팝업창을 다시 띄우지 않는 소스 황제낙엽 2005.07.16 533
240 무지개링크 (rainbowlink) file 황제낙엽 2005.07.16 499
239 유용한 자바스크립트 예제 몇가지 (Tree 및...) file 황제낙엽 2005.10.20 455
238 브라우저에서 뒤로 가기 막기와 펑션키(function key) 막기 황제낙엽 2005.10.21 579
237 카페의 회람 . 막기 소스 황제낙엽 2005.10.21 240
236 소스 보기 막기 황제낙엽 2005.11.18 539
235 JAVASCRIPT Debuger 프로그램 file 황제낙엽 2005.11.22 341
234 JAVASCRIPT REFERENCE 파일 file 황제낙엽 2005.11.22 460
233 자바 스크립트 플러그인 황제낙엽 2005.11.22 425
232 풍선 도움말 황제낙엽 2005.11.24 326
231 XML+JS 연동 다중셀렉트박스 (1) - <font color="brown">(MS Explorer 전용)</brown> 황제낙엽 2005.12.02 390
230 슬라이딩 메뉴 황제낙엽 2005.12.02 491
229 Methods and properties of Microsoft.XMLDOM 황제낙엽 2005.12.04 427
228 폼으로 XML 데이터 전송 (JSP+Javascript) 황제낙엽 2005.12.04 459
227 자바스크립트로 서버의 XML파일을 접근 (실패했슴) 황제낙엽 2005.12.11 715