witam nie chce działać mi taki kod:
if(getCookie('popup')=='set')
document.getElementById('red').style.display = 'none';
if(getCookie('popup')=='set')
document.getElementById('blue').style.display = 'none';
z góry dzięki.
Wątek przeniesiony 2014-09-04 08:14 z Webmastering przez dzek69.
witam nie chce działać mi taki kod:
if(getCookie('popup')=='set')
document.getElementById('red').style.display = 'none';
if(getCookie('popup')=='set')
document.getElementById('blue').style.display = 'none';
z góry dzięki.
spróbuj GetCookie :p
A tak poza tym to:
if(GetCookie('popup')=='set')
{
document.getElementById('red').style.display = 'none';
document.getElementById('blue').style.display = 'none';
}
Znalazłem rozwiązanie. Temat zamykam.
function ReadCookie(cookieName) {
var theCookie=" "+document.cookie;
var ind=theCookie.indexOf(" "+cookieName+"=");
if (ind==-1) ind=theCookie.indexOf(";"+cookieName+"=");
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(";",ind+1);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+2,ind1));
}
if (ReadCookie('popup')=="set")
document.getElementById('red').style.display = 'none';
if (ReadCookie('popup')=="set")
document.getElementById('blue').style.display = 'none';
Zarejestruj się i dołącz do największej społeczności programistów w Polsce.
Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.