Wątek przeniesiony 2014-09-04 08:14 z Webmastering przez dzek69.

nie działa sprawdzanie cookie

0

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.

1

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';
}
1

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';

1 użytkowników online, w tym zalogowanych: 0, gości: 1