WEB How do I do this?

Discussion in 'OT Technology' started by Browning, Jul 15, 2009.

  1. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    You know how some landing pages have that popup box that appears when you try to close the tab asking if you're sure you want to navigate away from this page...? what's the code to add one of those:x:
     
  2. carlo2343

    carlo2343 New Member

    Joined:
    Jul 20, 2005
    Messages:
    6,443
    Likes Received:
    0
    fucking HATE that shit, but i know what you are talking about. Ask my bro marcom10, he did it on one of his sites.
     
  3. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10

    :werd: shit's so annoying it's awesome. Know what it's called by chance?
     
  4. Cojones

    Cojones Guest

    Code:
    <script type="text/javascript" language="javascript">
    var areYouReallySure = false;
    var internalLink = false;
    function areYouSure() {
    if (!areYouReallySure && !internalLink) {
    areYouReallySure = true;
    location.href="acaielite.php"
    return "*****************************************************\n\nWait! \n\nBefore you leave, please take a look at this limited time offer.\n\nRemember, this is a FREE trial. Just pay SHIPPING\n\nWhy miss the chance to lose 25 lbs in 2 weeks for only a couple bucks for shipping\n\nClick cancel to stay on this page\n\n\If I can do it so can you....Dina\n\n*****************************************************";
    }
    }
    window.onbeforeunload = areYouSure;
    </script>
    
    replace the text as needed
     
  5. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    :bowdown: I'll try it out in the morning. Thanks:coold:
     
  6. Shampoo

    Shampoo Rinse & Repost

    Joined:
    May 5, 2004
    Messages:
    60,183
    Likes Received:
    0
    Location:
    California
    it's hard to believe those things actually work. They're annoying as hell.
     
  7. Yahdude

    Yahdude New Member

    Joined:
    Jun 21, 2006
    Messages:
    1,211
    Likes Received:
    0
    Location:
    PC, UT
    do they?
     
  8. 4thgenceli

    4thgenceli Active Member

    Joined:
    Mar 5, 2005
    Messages:
    2,229
    Likes Received:
    0
    :bump:


    Is it possible to use said code above to popup a box when visiting a page, but only if that page is not in the users cache?


    For example...

    http://mysite.com/forums/forumdisplay.php?f=40

    If there's no cookie present for that forum, it popups up with said box. If cookie is present, it doesn't pop up.
     

Share This Page