1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need code for traffic retainer

Discussion in 'Programming' started by MaverickMoney, Nov 12, 2009.

  1. #1
    I'm not exactly sure what the proper name for it is, but I'd like something that will popup when the user tries to close the window, asking if they really want to close the window.

    I know there are scripts out there, I'm just not sure what they're called. Any help is appreciated.
     
    MaverickMoney, Nov 12, 2009 IP
  2. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can be achieved thru Javascript. It can be done using the onbeforeunload event of the window. It will be something like below

    Add the below code between the <HEAD></HEAD> tags.

    And then replace the <BODY> tag with this

     
    Last edited: Nov 12, 2009
    urstop, Nov 12, 2009 IP
    MaverickMoney likes this.