how do you only allow a popup to popup once

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Graham

    how do you only allow a popup to popup once

    Hi
    I use an OnLoad event in the body tag to open a popup window. I would like
    to know how to go about only allowing the window to popup once i.e on
    subsequent visits to the parent page, the popup np longer pops up. I think
    it is irritating to users to have to close the popup everytime they visit
    the page. I think I need to set a cookie so that the server knows the
    visitor is a return visitor and not a new visitor, but I have no idea how to
    write the code. I do know a little php so I could combine php and javascript
    if that is the best way to achieve my goal.
    thanks
    David




  • Carsten B.

    #2
    Re: how do you only allow a popup to popup once

    "David Graham" <david.graham18 @ntlworld.com> schrieb im Newsbeitrag
    news:s5nub.136$ 454.91@newsfep1-gui.server.ntli .net...[color=blue]
    > Hi
    > I use an OnLoad event in the body tag to open a popup window. I would like
    > to know how to go about only allowing the window to popup once i.e on
    > subsequent visits to the parent page, the popup np longer pops up. I think
    > it is irritating to users to have to close the popup everytime they visit
    > the page. I think I need to set a cookie so that the server knows the
    > visitor is a return visitor and not a new visitor, but I have no idea how[/color]
    to[color=blue]
    > write the code. I do know a little php so I could combine php and[/color]
    javascript[color=blue]
    > if that is the best way to achieve my goal.
    > thanks
    > David
    >
    >
    >
    >[/color]

    Set a cookie. Read the cookie. If the cookie exists, don´t show the popup,
    else show it.


    Comment

    • David Graham

      #3
      Re: how do you only allow a popup to popup once


      "Carsten B." <spam.me@web.de > wrote in message
      news:3fb9ff1b$1 @olaf.komtel.ne t...[color=blue]
      > "David Graham" <david.graham18 @ntlworld.com> schrieb im Newsbeitrag
      > news:s5nub.136$ 454.91@newsfep1-gui.server.ntli .net...[color=green]
      > > Hi
      > > I use an OnLoad event in the body tag to open a popup window. I would[/color][/color]
      like[color=blue][color=green]
      > > to know how to go about only allowing the window to popup once i.e on
      > > subsequent visits to the parent page, the popup np longer pops up. I[/color][/color]
      think[color=blue][color=green]
      > > it is irritating to users to have to close the popup everytime they[/color][/color]
      visit[color=blue][color=green]
      > > the page. I think I need to set a cookie so that the server knows the
      > > visitor is a return visitor and not a new visitor, but I have no idea[/color][/color]
      how[color=blue]
      > to[color=green]
      > > write the code. I do know a little php so I could combine php and[/color]
      > javascript[color=green]
      > > if that is the best way to achieve my goal.
      > > thanks
      > > David
      > >
      > >
      > >
      > >[/color]
      >
      > Set a cookie. Read the cookie. If the cookie exists, don´t show the popup,
      > else show it.
      >[/color]
      Thanks Carsten - I will read up on this. Can I ask for a few hints as to the
      relevant code to carry this out
      David


      Comment

      • Stuart Palmer

        #4
        Re: how do you only allow a popup to popup once

        David, Take a look at yahoo and punch in 'Javascript cookies' you should get
        a variety of examples on how to create and read them if they exist.

        Stuart Palmer

        "David Graham" <david.graham18 @ntlworld.com> wrote in message
        news:TVnub.7507 $o97.2973408@ne wsfep2-win.server.ntli .net...[color=blue]
        >
        > "Carsten B." <spam.me@web.de > wrote in message
        > news:3fb9ff1b$1 @olaf.komtel.ne t...[color=green]
        > > "David Graham" <david.graham18 @ntlworld.com> schrieb im Newsbeitrag
        > > news:s5nub.136$ 454.91@newsfep1-gui.server.ntli .net...[color=darkred]
        > > > Hi
        > > > I use an OnLoad event in the body tag to open a popup window. I would[/color][/color]
        > like[color=green][color=darkred]
        > > > to know how to go about only allowing the window to popup once i.e on
        > > > subsequent visits to the parent page, the popup np longer pops up. I[/color][/color]
        > think[color=green][color=darkred]
        > > > it is irritating to users to have to close the popup everytime they[/color][/color]
        > visit[color=green][color=darkred]
        > > > the page. I think I need to set a cookie so that the server knows the
        > > > visitor is a return visitor and not a new visitor, but I have no idea[/color][/color]
        > how[color=green]
        > > to[color=darkred]
        > > > write the code. I do know a little php so I could combine php and[/color]
        > > javascript[color=darkred]
        > > > if that is the best way to achieve my goal.
        > > > thanks
        > > > David
        > > >
        > > >
        > > >
        > > >[/color]
        > >
        > > Set a cookie. Read the cookie. If the cookie exists, don´t show the[/color][/color]
        popup,[color=blue][color=green]
        > > else show it.
        > >[/color]
        > Thanks Carsten - I will read up on this. Can I ask for a few hints as to[/color]
        the[color=blue]
        > relevant code to carry this out
        > David
        >
        >[/color]


        Comment

        • kaeli

          #5
          Re: how do you only allow a popup to popup once

          In article <s5nub.136$454. 91@newsfep1-gui.server.ntli .net>,
          david.graham18@ ntlworld.com enlightened us with...[color=blue]
          > Hi
          > I use an OnLoad event in the body tag to open a popup window. I would like
          > to know how to go about only allowing the window to popup once i.e on
          > subsequent visits to the parent page, the popup np longer pops up. I think
          > it is irritating to users to have to close the popup everytime they visit
          > the page.[/color]

          Don't worry, most of us have popup killers and don't see it at all.
          Unrequested popups are the most irritating thing EVER. So, we just don't
          let them pop up at all.


          --
          ~kaeli~
          "No matter what happens, somebody will find a way to take
          it too seriously."



          Comment

          Working...