Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2003
    Posts
    7
    Member #
    1498
    is it possible to have a popup window appear on the first visit of a user to a site and then never again? Kinda like giving once off instructions on how to use the site that you don't need to be told again.

    Thanks

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Code:
    <script language="javascript">
    function setCookie(name, value) {
        document.cookie = name + '=' + escape(value) + ';';
    }
    function getCookie(name) {
        var cookies = document.cookie;
        var a = cookies.indexOf(name + '=');
        if (a == -1) return null;
        a = cookies.indexOf('=', a) + 1;
        var b = cookies.indexOf(';', a);
        b = (b == -1) ? cookies.length : b;
        return unescape(cookies.substring(a, b));
    }
    function pop() {
        if (getCookie('stopPop') != 1) {
            window.open('popup.html');
            setCookie('stopPop', 1);
        }
    }
    </script>
    
    <body onload="pop()">
    </body>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:36 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com