Jump to content

javascript cookie


freddie.aziz

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...