> ich setze ein Wertepaar und die Eigenschaft f�r "expires".
>
> Jetzt lese ich gerade, dass auch noch "path" und "domain"
> anzugeben sind,
> damit der Cookie dauerhaft erhalten bleibt.
Echt? Also bei mir wird das Cookie auch ohne path und domain
gespeichert...
Ich benutze folgenden Code:
======================================>
function getexpirydate( nodays){
var UTCstring;
Today = new Date();
nomilli=Date.parse(Today);
Today.setTime(nomilli+nodays*24*60*60*1000);
UTCstring = Today.toUTCString();
return UTCstring;
}
function getcookie(cookiename) {
var cookiestring=""+document.cookie;
var index1=cookiestring.indexOf(cookiename);
if (index1==-1 || cookiename=="") return "";
var index2=cookiestring.indexOf(';',index1);
if (index2==-1) index2=cookiestring.length;
return
unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function setcookie(name,value,duration){
cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
document.cookie=cookiestring;
if(!getcookie(name)){
return false;
}else{
return true;
}
}
<======================================
Claudius
------------------
Professionelles .NET Hosting auf leistungsf�higen Servern.
ASP.NET, VS.NET, XML, CDO, SQL 2000 und vieles mehr.
Informieren Sie sich jetzt unter http://www.aspnet.de
_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net