i want to give my visitors a cookie

Discussion in 'JavaScript' started by zodiac, Dec 3, 2006.

  1. #1
    <script type="text/javascript" src="js.js"></script>
    <span onClick="writeCookie(0)">
    <script language="javascript">
    <!--
    
       link ('link here');
    
    
    // -->
    
    </script>
    </span>
    Code (markup):
    that code will give a cookie if you click on the link.
    what i want to do is give someone that cookie if they visit a certain page.(clicking anywhere on the page would be fine to)
     
    zodiac, Dec 3, 2006 IP
  2. smallbuzz

    smallbuzz Peon

    Messages:
    125
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <script type="text/javascript" src="js.js"></script>
    <script language="javascript">
    writeCookie(0);
    <!--

    link ('link here');


    // -->

    </script>
    </span>
     
    smallbuzz, Dec 5, 2006 IP