I've a problem with JavaScript and cookies. I have a form with some user data. It's not possible to write more than 18 or 19 form.elements[.....].value into a cookie. I have read that the maximum size of a cookie is 4 kb, My cookie is only 2 kb.
This is my script, I found it on Htmlgoodies.com
if(document.cookie != document.cookie)
// I don't no why I use this if constr. But I 've copy it
// from the manual. When I not use this if it doesn't work
// correctly
{
index=document.cookie.indexOf(inputName);
}
else
{
index=-1;
}
if(index=-1)
{
inputValue=document.bestellen.elements[inputName].value;
document.cookie= "C"+ inputName + "=" + inputValue
+ "; expires=" + expiry.toGMTString();
Can someone help me,
Thanks,
Qwark
This is my script, I found it on Htmlgoodies.com
if(document.cookie != document.cookie)
// I don't no why I use this if constr. But I 've copy it
// from the manual. When I not use this if it doesn't work
// correctly
{
index=document.cookie.indexOf(inputName);
}
else
{
index=-1;
}
if(index=-1)
{
inputValue=document.bestellen.elements[inputName].value;
document.cookie= "C"+ inputName + "=" + inputValue
+ "; expires=" + expiry.toGMTString();
Can someone help me,
Thanks,
Qwark