Greetings,
What do I need to change here so that when the popup loads it will not reload when a visitor returns to the page during a visit. I want it to load the next time they start a new session.
TIA and regards...
Walt...
function getCookie(NameOfCookie){
if (document.cookie.length > 0) {
begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1) {
begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end));
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}
function delCookie (NameOfCookie) {
if (getCookie(NameOfCookie)) {
document.cookie = NameOfCookie + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function DoTheCookieStuff()
{
visited=getCookie('visited');
if (visited==null)
{
setCookie('visited','yes',365)
MyWindow=window.open('http://www.c-spotco.com/weather_page.htm','MyWindow','toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollb ars=yes,resizable=yes,width=640,height=480,left=1,top=1');
}
}
What do I need to change here so that when the popup loads it will not reload when a visitor returns to the page during a visit. I want it to load the next time they start a new session.
TIA and regards...
Walt...
function getCookie(NameOfCookie){
if (document.cookie.length > 0) {
begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1) {
begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end));
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}
function delCookie (NameOfCookie) {
if (getCookie(NameOfCookie)) {
document.cookie = NameOfCookie + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function DoTheCookieStuff()
{
visited=getCookie('visited');
if (visited==null)
{
setCookie('visited','yes',365)
MyWindow=window.open('http://www.c-spotco.com/weather_page.htm','MyWindow','toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollb ars=yes,resizable=yes,width=640,height=480,left=1,top=1');
}
}
Comment