[thelist] Safari. Cannot set a cookie through script?

Scott Blanchard octigonuser at hotmail.com
Fri Mar 19 15:35:22 CST 2004


I have a routine that sets a series of cookies. It works when executed in 
any web browser that I've tested except Safari. Is there some limitation on 
scripting cookies in Safari? I can't seem to get this to work.

Here's the function...

function doSettings(what) {
	var myArray = what.split(',');
	for (var i = 1; i<myArray.length; i++)
	{
		document.cookie = myArray[i]+"; expires=Wed, 24-Nov-66 00:00:01 GMT";
	}
alert(document.cookie); //this reports correct cookie values in all browsers 
except Safari !!!
}


//the what argument contains a string that looks like this...

token1=true,token2=false,token3=true

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



More information about the thelist mailing list