The code below works in all current browser except for IE. In IE the message doesn't display.
if (navigator.cookieEnabled == 0) {
document.write("Cookies are not enabled.");
}
Can someone tell me what I can do to make the above code work in IE 10 & 11?
I've tried code that works in IE but then it works in most browser except for Safari. Here's the code.
<script type="text/javascript">
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
var cookies = ("cookie" in document && (document.cookie.length > 0 ||
(document.cookie = "test").indexOf.call(document.cookie, "test") > -1));
document.write(cookies ? "" : "Cookies are not enabled.");
</script>
But this still displays for FF, Safari, and Chrome. So then I have two messages displaying....
This will do it:
"$(document).ready()" in JavaScript