I'm trying to implement javascript cookies here.. <script type="text/javascript"> function setCookie(KNwidget,fbfans,1); if (function getCookie(KNwidget)) { } else { jQuery(document).ready(function(){ jQuery.lightbox("index.php?test=show-this-when-no-cookie"); }); } </script> Code (markup): what's the problem with this code?? can u help me fix this please?
function SetCookie(cookieName,cookieValue,nDays); so is fbfans variable or value ?? ... you have to make it "fbfans" if its a value. and i think you got problem with your if statment make it like this:- if (getCookie(KNwidget)) Code (markup): good luck
you're calling a function the wrong way, it should be... <script type="text/javascript"> setCookie(KNwidget,fbfans,1); if (getCookie(KNwidget)) ... </script> HTML: