I have a CD using frames that at some points loads a page from the server. This page needs to be able to read a cookie set by a different frame (the html page will be located on a CD on a local drive).
Below is part of the test I am doing: I have set the domain but the cookie (which works fine without domain set) will not work with it set here.
If the below code is right then I must have the domain name written wrong and will have to go throught the IT dept here (which means it could be days before I get a response), so I am hoping some of the code is wrong...
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
OK then I set the cookie here:
setCookie("counter", visits, now, "/", "mydomain.com");
with 'visits' and 'now' being variables.
Gracias
Below is part of the test I am doing: I have set the domain but the cookie (which works fine without domain set) will not work with it set here.
If the below code is right then I must have the domain name written wrong and will have to go throught the IT dept here (which means it could be days before I get a response), so I am hoping some of the code is wrong...
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
OK then I set the cookie here:
setCookie("counter", visits, now, "/", "mydomain.com");
with 'visits' and 'now' being variables.
Gracias