View Single Post
Old 02-02-2013, 09:55 AM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,058
Quote:
Originally Posted by Nookster View Post
Just modify the line...
Code:
var stagedPopFrequency = "1 days";
...to read...
Code:
var stagedPopFrequency = "10 mins";
Learn to program before you learn a programming language.

Um, nope, that's not gonna work.

The set expire date is using getdate() which returns the day of the month PLUS the integer value in the frequency string to compute the new expire date. It is pretty much hard coded to use a days value.

Quote:
function stagedSetCookie(Name, Value, Expire) {
if (Expire != null) {
var expireDate = new Date();

expireDate.setDate(expireDate.getDate() + parseInt(Expire));

document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString();
} else {
document.cookie = Name+"="+Value+";path=/";
}
}
so, where the expire date is being calculated has to be changed to use something other than getdate. getminutes might work but I would have to play with it some to make sure.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook