JavaDude32
Programmer
Alright, I have a script so far and I tested it in Mozilla and it seems to work, but no such luck in IE. The idea is to determine if the user has cookies enabled. If the user doesn't have at least cookies enabled for first-party cookies or cookies from the originating site, it redirects them to the help page. Can anyone help me find what's going wrong?
P.S. Reason for this script is that the website requires cookies to be able to navigate around lessons. Plus it allows the user to return to a lesson rather then restart.
Code:
<script language="JavaScript">
if(document.cookie) {
} else {
if(document.location.href=="[URL unfurl="true"]http://mainsite/")[/URL] {
window.alert("You need to enable cookies.");
document.location.href="[URL unfurl="true"]http://mainsite/help/";[/URL]
}
}
</script>
P.S. Reason for this script is that the website requires cookies to be able to navigate around lessons. Plus it allows the user to return to a lesson rather then restart.