Здравствуйте!
помогите разобраться почему не работает
cache
function process(name, value, title)
{
if (xmlHttp)
{
name=encodeURIComponent(name);
value=encodeURIComponent(value);
title=encodeURIComponent(title);
//cacheEntry = ("id=" + title + "&name="+ name +"&value=" + value);
cache.push("id=" + title + "&name="+ name +"&value=" + value);
if ((xmlHttp.readyState == 4 || xmlHttp.readyState == 0 )
&& cache.length > 0)
{
var cacheEntry = cache.shift();
xmlHttp.open("POST", serverAdres, true);
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlHttp.send(cacheEntry);
}
else
setTimeout('process()', 1000);
}
}
без кеша работает прекрасно, но хочется с ним
может чегото не хватает?