[thelist] yet another popup question

Meredith Tupper meredith at pintsize.com
Tue Jan 8 16:43:39 CST 2002


Hello all,

Hopefully this is a quickie...I want to set the cookie on
this popup so that site visitors will see the popup only
once every 24 hours; however, I don't know how to change the
cookie expiration date.  How can I switch it from GMT to a
24 hour cycle?

< SCRIPT LANGUAGE="JavaScript" >
 <!--
 function GetCookie(name) {
   var arg=name+"=";
   var alen=arg.length;
   var clen=document.cookie.length;
   var i=0;
   while (i<clen) {
     var j=i+alen;
     if (document.cookie.substring(i,j)==arg)
       return "here";
     i=document.cookie.indexOf(" ",i)+1;
     if (i==0) break;
   }
   return null;
 }
 var visit=GetCookie("COOKIE1");
 if (visit==null){
    var expire=new Date();
     window.name = "thiswin";
     newwin=open("popup.html", "dispwin",
     "width=300,height=300,scrollbars=no,menubar=no");
    document.cookie="COOKIE1=here; expires=Thu 01-26-2002
00:00:00 GMT;";
 }
 // -->
 < /SCRIPT >

Profound thanks in advance for any assistance,
Meredith
<tip owed -- I gotta get this puppy finished pronto.>
--
PintSize Graphics & Web Hosting, Inc.
http://www.pintsize.com
meredith at pintsize.com
3225 S. MacDill Ave. #208
Tampa, FL 33629
813-835-5382






More information about the thelist mailing list