Committer: vvasin
LJSUP-14469: Cookie function should return value when set value.U trunk/htdocs/js/basic.js
Modified: trunk/htdocs/js/basic.js =================================================================== --- trunk/htdocs/js/basic.js 2012-12-04 07:49:52 UTC (rev 23410) +++ trunk/htdocs/js/basic.js 2012-12-04 08:28:24 UTC (rev 23411) @@ -25,8 +25,10 @@ // in the packed version for some reason... var path = options.path ? '; path=' + (options.path) : '', domain = options.domain ? '; domain=' + (options.domain) : '', - secure = options.secure ? '; secure' : ''; - document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + secure = options.secure ? '; secure' : '', + cookieValue = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + document.cookie = cookieValue; + return cookieValue; } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') {