mehmet: popup fenster nach "checked" nicht mehr zeigen (cookie)

Beitrag lesen

hier ein beispiel
leider funktioniert es nicht

<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
/* This code is Copyright (c) 1996 Nick Heinle and Athenia Associates,
 * all rights reserved. In order to receive the right to license this
 * code for use on your site the original code must be copied from the
 * Web site webreference.com/javascript/. License is granted to user to
 * reuse this code on their own Web site if and only if this entire copyright
 * notice is included. Code written by Nick Heinle of webreference.com.
 */
function getCookie (name) {
var dcookie = document.cookie;
var cname = name + "=";
var clen = dcookie.length;
var cbegin = 0;
        while (cbegin < clen) {
        var vbegin = cbegin + cname.length;
                if (dcookie.substring(cbegin, vbegin) == cname) {
                var vend = dcookie.indexOf (";", vbegin);
                        if (vend == -1) vend = clen;
                return unescape(dcookie.substring(vbegin, vend));
                }
        cbegin = dcookie.indexOf(" ", cbegin) + 1;
                if (cbegin == 0) break;
        }
return null;
}
function setCookie (name, value, expires) {
        if (!expires) expires = new Date();
document.cookie = name + "=" + escape (value) +
"; expires=" + expires.toGMTString() +  "; path=/";
}
function delCookie (name) {
var expireNow = new Date();
document.cookie = name + "=" +
"; expires=mon, 30-oct-06 00:00:01 GMT" +  "; path=/";
}
function toggleWelcome() {
        if (getCookie(cookieName) == "true") setCookie(cookieName, "false", top.expdate);
        else setCookie(cookieName, "true", top.expdate);
}
function offTemp() {
        if (getCookie(cookieName) == "true") {
        setCookie(cookieName, "offtemp", expdate);
        history.go(0);
        }
}
var expdate = new Date();
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365));
var cookieName = "welcome2";
var welcomePage = "welcome2.htm";
        if (getCookie(cookieName) == null || getCookie(cookieName) == "true") {
        setCookie(cookieName, "true", expdate);
        document.write ('<FRAMESET ROWS = "100%, *" FRAMEBORDER = NO BORDER = 0>');
        document.write ('<FRAME SCROLLING = AUTO SRC = "' + welcomePage + '"');
        document.write ('MARGINWIDTH = 5 MARGINHEIGHT = 5>');
        document.write ('</FRAMESET>');
        }
        else if (getCookie(cookieName) == "offtemp") {
        setCookie(cookieName, "true", expdate);
        }
// -->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE = "checkbox" onClick = "top.toggleWelcome()">
Don't show this welcome screen again.
</FORM>
<A HREF="javascript:top.offTemp()">Enter Main Page</A><br>
<A HREF="http://www.webreference.com/javascript/961125/source.html#part3" target="hgkh">Quelle</a><br>
<a href="http://forum.de.selfhtml.org/?t=123480&m=795368" target="uugg">Selfhtml Forum</a><br>
<A HREF="C:\Dokumente und Einstellungen\BenAdmin\Cookies" target="jhgggg">Locale Cookies</a><br>
</BODY>
</HTML>

gruss
mehmet