Results 1 to 2 of 2

Thread: Change days to session?

  1. #1
    Join Date
    Oct 2008
    Posts
    19
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Change days to session?

    1) Script Title: Recall Form Values script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rmremember.htm

    3) Describe problem: No problem...just needed slight modification to fit my needs

    Hi,

    The script comes with an instruction on changing the number of days to remember the Form Data by changing the value:

    Code:
    var memoryduration="X days"
    Would it require much work to modify this script to remember the form data just for the session or until the user close the browser?

    Or minimal, can I change it to hours or minutes instead?

    Example:

    Code:
    var memoryduration="30 minutes"
    Would that work?

    Thanks in advance.
    Last edited by thaidatelink; 08-20-2009 at 02:22 PM. Reason: More specific information

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    To change the cookie to session only, try removing the code in red below inside the .js file:

    Code:
    document.cookie = "mvalue"+window.location.pathname+"="+formvalues+"; path=/;expires=" + expireDate.toGMTString()
    DD Admin

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
  •