View Full Version : Change days to session?

08-20-2009, 02:17 PM
1) Script Title: Recall Form Values script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/formremember.htm

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


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

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?


var memoryduration="30 minutes"

Would that work?

Thanks in advance.

08-21-2009, 06:30 AM
To change the cookie to session only, try removing the code in red below inside the .js file:

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