PDA

View Full Version : Virtual Pagination no Cookie



KevinS
01-15-2010, 03:17 AM
1) Script Title:
Virtual Pagination Cookie
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/virtualpagination.htm
3) Describe problem:
Virtual Pagination is not creating a cookie I would like to set it up to retain your location for a year.
the javascript virtualpaginate.js appears to have code to create a cookie put is not.
your web page does create one
here is my test page http://www.victoryindependentbaptist.org/testindex.shtml
thank you for any help

KevinS
01-15-2010, 04:12 PM
changed virtualpaginate.js

// -------------------------------------------------------------------
// PRIVATE: setcssclass() method- Checks, Add, or Removes a class from an element
// -------------------------------------------------------------------


from
virtualpaginate.setCookie=function(name, value ){
document.cookie = name+"="+value
}

To
virtualpaginate.setCookie=function(name, value){
var date = new Date();
date.setTime(date.getTime()+(365*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = name+"="+value+expires;
}