Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the cookie question continued.

Status
Not open for further replies.

silverswim

Programmer
Oct 17, 2001
50
0
0
GB
Hi again.
I am still trying to get the pop up to only come up once at the start of each browser session. Now my code is :

function doCookie(){
if (document.cookie != document.cookie)
{ var the_date= new Date("January 15 2099");
var the_cookie_date=the_date.toGMTString();
var the_cookie = the_cookie_date;
document.cookie=the_cookie;
MM_openBrWindow('popUpWindow.htm','FreeTrial','resizable=no,width=250,height=250');
}
}

thats in the head, and in the body, onLoad calls it.
So i am basically seeing at the start of each session if there is a cookie. If not, then I set one, and pop the window up. Otherwise, the page should load normally. However, no pop up appears ever.
Thanks whoever can help,
Silverswim
 
silverswim -
Did you ever resolve this issue? I am at the same point in my design and would appreciate any advice you have.

Thanks.
 
hi silverswim,

just change this:
if (document.cookie != document.cookie)

to this:
if (!document.cookie)
======================================

if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top