SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Level 8 Chinese guy Archbob's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere in this vast universe
    Posts
    3,741
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to do timed pop-ups

    The Dark Squirrel of the Sith is stuck on how to do timed popups. Lets say I following code:

    <!-- Start of Back Console -->
    <script language="JavaScript">
    <!--
    browserVer = parseInt(navigator.appVersion);
    SX=window.open('http://topsites.albinotreefrog.net/out.php?site=1022974165',
    'SXback','toolbar=1,location=1,status=1,menubar=1,'+
    'scrollbars=1,resizable=1,width=500,height=300');

    if( browserVer >= 4) {
    window.focus() ;
    }
    // -->
    </script>
    <!-- End of Back Console -->


    I want this to pop only once every 24 hours per unique visitor, how do I do this?

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cookies! Set a cookie when the window pops, then expires after 24 hours. Then before popping the window checked to see if the cookie has been set... if it has, don't pop the window...
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    Level 8 Chinese guy Archbob's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere in this vast universe
    Posts
    3,741
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you give me an example code?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •