From: SourceForge.net <no...@so...> - 2005-09-05 09:36:14
|
Bugs item #1282007, was opened at 2005-09-05 11:36 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105757&aid=1282007&group_id=5757 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DynAPI 3 API Group: Feature Request Status: Open Resolution: None Priority: 5 Submitted By: mosh (mosh666) Assigned to: Nobody/Anonymous (nobody) Summary: setCookie() with more parameters Initial Comment: Wouldn't it be possible to add some more features to the setCookie() function in /src/util/cookie.js? in my apps i'm using a function like this: this.setCookie = function(cookie_name, cookie_value, cookie_lifetime, cookie_path, cookie_domain, is_secure) { if (!cookie_name) { return false; } document.cookie = escape(cookie_name) + '=' + escape(cookie_value) + (cookie_lifetime ? ';expires=' + (new Date((new Date()).getTime() + (1000 * cookie_lifetime))).toGMTString() : '' ) + (cookie_path ? ';cookie_path=' + cookie_path : '') + (cookie_domain ? ';cookie_domain=' + cookie_domain : '') + (is_secure ? ';secure' : ''); if (cookie_lifetime < 0) { if (typeof this.getCookie(cookie_name) == 'string') { return false; } return true; } if (typeof this.getCookie(cookie_name) == 'string') { return true; } return false; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105757&aid=1282007&group_id=5757 |