View Full Version : checking cookie support

10-13-2003, 08:53 PM
I want to check cookie support on the clients browser. If he doesnt support cookies a popup message should popup. I use the following script but somewhere it is going wrong. Please help me!??
<script type="text/javascript">
var cookieEnabled=(navigator.cookieEnabled)? true : false

//if not IE4+ nor NS6+
if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){
cookieEnabled=(document.cookie=="testcookie")? true : false
document.cookie="" //erase dummy value

//if cookies are enabled on client's browser
if (cookieEnabled) {
alert("you have to enable your cookies ...");
bst wshs Bafl