Results 1 to 2 of 2

Thread: Virtual Pagination no Cookie

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Virtual Pagination no Cookie

    1) Script Title:
    Virtual Pagination Cookie
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...pagination.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...estindex.shtml
    thank you for any help

  2. #2
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default solved

    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;
    }
    Last edited by KevinS; 01-15-2010 at 04:20 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •