PDA

View Full Version : Popunder capping question


Aceking
08-26-2003, 09:16 PM
Hi:

I was reading this script:

http://javascriptkit.com/script/script2/popunder.shtml

but have a problem. I need my pop under to come up once every 24 hours, not once every browser session. Can someone help me modify it to do that?

Thank you so much!

glenngv
08-27-2003, 04:52 AM
set the expiration of the cookie to 1 day:

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
var d = new Date();
d.setDate(d.getDate()+1);
d.toGMTString();
document.cookie="popunder=yes; expires=" + d;
}
}

Aceking
08-27-2003, 04:12 PM
Thanks glenngv!

That did it!

Ace.