I need to modify a pup up window code

Discussion in 'HTML & Website Design' started by wydady2008, Aug 7, 2011.

  1. #1
    hi
    i need to modify this simple code
    <SCRIPT LANGUAGE="JavaScript">
    window.open("http://www.watchingate.com/","windowname","height=400,width=600,scrollbars, resizable")
    </SCRIPT>
    Code (markup):
    it's a pup up code which open a new window for my new website, now when i add this code to <head> section , the window appears everytime i click on a page or a post, what i want is that the window appears just once or 2 when the visitors visit my site because i don't want them to feel annoyed.
    also i'm using blogger so i can't upload files or anything else just html and javascript codes

    so plz i need some help here ;)
     
    wydady2008, Aug 7, 2011 IP
  2. linc

    linc Member

    Messages:
    355
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    28
    #2
    Maybe you can just place it in your home page?
     
    linc, Aug 9, 2011 IP
  3. Rufas

    Rufas Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    3
    Trophy Points:
    0
    #3
    Set a cookie. When the user visit your site for the first time, your popup will appear and you'll set a cookie to record that. Then, when the user navigate to another page, you'll just check if there is such cookie. If yes, no popup.

    You can learn how to set cookies here:
    www.w3schools.com/JS/js_cookies.asp

    - Rufas
     
    Rufas, Aug 10, 2011 IP
  4. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #4
    Rufas' idea is a good one.
    Cookies are a way to track the users movements as well as seeing if they have been to your site before. Although European laws are changing with regards to the use of cookies.
     
    Toycel, Aug 11, 2011 IP