PDA

View Full Version : cookie problems



gurde_com
09-24-2005, 04:45 PM
function savemenustate(){
var inc=1;
var blockid="";
var cookiename="";
var cookievalue="";
var cc="";
while(document.getElementById("sub"+inc)){
if(document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc;
cookiename=(persisttype=="sitewide")?"switchmenu":window.location.pathname;
cookievalue=(persisttype=="sitewide")?blockid+";path=/":blockid;
cc+=cookiename+"="+cookievalue;
}
inc++;
}
document.cookie=cc;
alert(cc);
alert(document.cookie);
}
whi is this not working?

jscheuer1
09-24-2005, 10:58 PM
This is a script fragment, so it is hard to be precise. Works fine here though, two blank alert boxes and no errors in OP, FF or IE. What did you want it to do?