View Single Post
Old 02-02-2013, 10:17 AM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,073
Where you have this:

Quote:

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

Change to:

Quote:

expireDate.setMinutes(expireDate.getMinutes() + parseInt(Expire));
And then change the initialization at the top to var stagedPopFrequency = "10 minutes";

You do not need to say days or minutes or anything in there actually, the script is only using the integer part.

The code is also using toGMTString which is deprecated and should be changed to toUTCString

This is still not a wonderful solution in my mind because now it is hardcoded for minutes instead of days as it was before.

If you truly wanted this to use the passed in value 1 days, 1 hours, 1 minutes,.... where you could set it however you wanted on the fly it would take some additional work.

.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook