Well, other guy wrote that... so I can't explain... but the only function I need for this script is show/hide with cookies, to make possible visitors ocult some informations of the site and remember them to the next visit... Can it be possible with this script?
I need it persists after I close and open the navigator again...
Ok, that's what I do:
function SetCookie (name, value, per, exp) {
cstr = name + "=" + escape(value) + ";"
if(per){
addtime=(exp*24*60*60*1000)
expdate = new Date()
expdate.setTime(expdate.getTime() + addtime)...
You're right... I'm a newbe! But I know there's something wrong with the "addtime" parameter... I've tried to change it at same ways like (31*24*60*60), and I got nothing! can you show me what I have to do, Dan? Thank you.
This script works fine, but it saves cookies only when the navigator is open. Closing it, the cookies stop to save. How to resolve this?
<html>
<head>
<script type="text/javascript">
function getCookieVal(offset) {
endstr = document.cookie.indexOf (";", offset)
if(endstr == -1) endstr =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.