Jump to content

javascript cookie


freddie.aziz
 Share

Recommended Posts

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>

what's the problem with this code?? can u help me fix this please?

Link to comment
Share on other sites

function setCookie(KNwidget,fbfans,1);if (function getCookie(KNwidget))
The use of the function keyword in both of these statements is incorrect. Use function to define a function, not to execute a function.Make sure also that you do in fact have the setCookie and getCookie functions added to your script somewhere.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...