Does anyone know how to make a pop-up change with each new visitor. I have created a pop-up that randomly changes but my work wants it to go from lastchance.html to lastchance5.html each time a visitor enters the site.
var expDays = 7; // the number of days the cookie will last
var popup=new Array();
popup[0]=new Array("popup[1]=new Array("popup[2]=new Array("popup[3]=new Array("popup[4]=new Array("var winprops = "width=400, height=430,location=no,toolbar=no,menubar=no,scrollbars=no,resizeable=yes";
exited = 1;
if(exited){
var count = GetCookie('count');
if(count == null){
count=1;
SetCookie('count', count, exp);
// always set this value one less then the array or amount of pop-ups
var num=(Math.round(Math.random()*4));
var winpops=window.open(popup[num][0],"",winprops);
}
else{
count++;
SetCookie('count', count, exp);
This is a sample of what I was doing in JavaScript.
var expDays = 7; // the number of days the cookie will last
var popup=new Array();
popup[0]=new Array("popup[1]=new Array("popup[2]=new Array("popup[3]=new Array("popup[4]=new Array("var winprops = "width=400, height=430,location=no,toolbar=no,menubar=no,scrollbars=no,resizeable=yes";
exited = 1;
if(exited){
var count = GetCookie('count');
if(count == null){
count=1;
SetCookie('count', count, exp);
// always set this value one less then the array or amount of pop-ups
var num=(Math.round(Math.random()*4));
var winpops=window.open(popup[num][0],"",winprops);
}
else{
count++;
SetCookie('count', count, exp);
This is a sample of what I was doing in JavaScript.