Howdy All,
I am trying to detect if the user has cookies enabled on a page and
display text accordingly. My cookie detection works but I can't get
the divs to work. Here is the javascript and html does anybody have
any sugestions?
<script language="JavaS cript">
function window_onload() {
var sCookie;
SetCookie("Cook ieTest","True") ;
sCookie = GetCookie("Cook ieTest");
if (sCookie = "True")
{
divNoCookies.st yle.display = "none";
divDisclaimer.s tyle.display = "block";
}
}
window.onload = window_onload;
</script>
<div ID="divDisclaim er" Name="divDiscla imer" style="display: none">
<!-- #include file='County\Di sclaimer.htm' -->
</div>
<div ID="divNoCookie s" Name="divNoCook ies" style="display: block">
<tr>
<td>
<FONT color=red>
Your browser or your firewall is not set up to allow
cookies. This site requires session cookies. Please check your
browser
settings or contact your system administrator.
</FONT>
</td>
</tr>
</div>
I am trying to detect if the user has cookies enabled on a page and
display text accordingly. My cookie detection works but I can't get
the divs to work. Here is the javascript and html does anybody have
any sugestions?
<script language="JavaS cript">
function window_onload() {
var sCookie;
SetCookie("Cook ieTest","True") ;
sCookie = GetCookie("Cook ieTest");
if (sCookie = "True")
{
divNoCookies.st yle.display = "none";
divDisclaimer.s tyle.display = "block";
}
}
window.onload = window_onload;
</script>
<div ID="divDisclaim er" Name="divDiscla imer" style="display: none">
<!-- #include file='County\Di sclaimer.htm' -->
</div>
<div ID="divNoCookie s" Name="divNoCook ies" style="display: block">
<tr>
<td>
<FONT color=red>
Your browser or your firewall is not set up to allow
cookies. This site requires session cookies. Please check your
browser
settings or contact your system administrator.
</FONT>
</td>
</tr>
</div>
Comment