Jump to content

Checking cookie status not working in ie6


c_shelswell

Recommended Posts

Hi I'm having a bit of a problem checking cookies in ie6. The below works fine in Firefox and if cookies are enabled works fine in ie6 but if i disable cookies ie6 doesn't display the message to say so. I've tried a number of different scripts to sort this but so far it's all the same story. Any ideas would be great.

 

var cookieEnabled=(navigator.cookieEnabled)? true : false

	if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){
	document.cookie="testcookie"
	cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false
	}

	if (cookieEnabled)
	{
	 	document.write('ENABLED - Good to go!');
	}
	else
	{
	 	document.write('<span class="errorMsg"><a href="./login/cookie-help.html" target="_blank" >DISABLED CLICK HERE</a></span>');
	}

 

Cheers

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.