I've gotten a code which works everywhere apart from Safari, and I can't see why!
I"ll give people a look at it, maybe someone can let me know what the problem is with Safari.
</head>
<body onload = "readCookie(name)">
<script type = "text/javascript">
var name = "mypage";
var value = 0;
var days = 365; // days before cookie expires
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
var expires = "; expires = "+ date.toGMTString();
}
else var expires = "";
document.cookie = name + "="+ value + expires + "; path=/"; // available throughout the directory
var newpage = "flash" + value + ".html";
window.location = newpage; //redirect to the new page
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i = 0;i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') value = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) value = c.substring(nameEQ.length,c.length);
}
value ++;
if (value > 5) { value = 1 } // redirect pages are yourpage + 1,2,3,4,5
createCookie(name,value,days);
return null;
}
</script>
<div id="container">
<div id="header">
<h1>Target
</h1>
<div id="bordersplash">
</div>
</div>
</body>
</html>I'd be so grateful for any tips any of you Safari guys might have!
Cheers!
Help














