Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
Cookies fail when using URL Frame re-direct
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Don Juan, post: 4921299"] function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } document.write('<br>location.href: ' + location.href) document.write('<br>location.protocol: ' + location.protocol) document.write('<br>location.host: ' + location.host) document.write('<br>location.hostname: ' + location.hostname) document.write('<br>location.pathname: ' + location.pathname) document.write('<br>document.domain: ' + document.domain) document.write('<br>document.referrer ' + document.referrer) document.write('<br>read cookie test: ' + readCookie("test")) document.write('<br>set cookie test : ' + createCookie("test","DVT",3)) document.write('<br>read cookie test: ' + readCookie("test"))[/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
Cookies fail when using URL Frame re-direct
Top