PDA

View Full Version : Featured Content Slider Cookie



NSOrg
11-22-2006, 08:23 PM
1) Script Title: Featured Content Slider

2) Script URL (http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm)

How to Cookie in add life time expires date

As like


function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

ddadmin
11-23-2006, 01:57 AM
Hmm not sure I understand. You wish the cookie to never expire, instead of the current browser session duration?

NSOrg
11-23-2006, 12:54 PM
I mean how to I am Cookie in 1 month or 1 year expires date add.