Big image/div popup on site index, but only first time page is reached...

Discussion in 'CSS' started by Error404, Apr 12, 2009.

  1. #1
    Hi,
    I need the following...

    I need to put big pop-up image on site index that opens when visitor go to the first page of my web site. And then need option to close it. I know how to do it (without using javascript popups) using big div absolutely positioned on center with image in it, and then place X button on that div, and make it to display:none on the click on that X, and then full site shows up which basically was in background all the time. That is all managed with CSS.

    Now what I need is that once the image is closed when visitor goes to index again, it will not show again. So it shows up only first time page is reached then doesn't show again, cause I don't want to bother people with it every time they visit index, cause image should be some kind of banner announcement or something like that so it's enough to be shown once.

    I know this might not have too much with CSS anymore, but not sure where else to ask... :/

    Thanks
     
    Error404, Apr 12, 2009 IP
  2. weboweb

    weboweb Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you don't want to use a Javascript solutions (using Cookies), you'll need to look into a backend solution. For example, if you're using PHP, you could set a session variable ($_SESSION) when the user first visits the site. You then conditionally load the popup when this variable is not set. This will require that you have some kind of templating engine running or a very small set of HTML pages to edit.
     
    weboweb, Apr 12, 2009 IP
  3. sgtsloth

    sgtsloth Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This isn't something that CSS can handle on its own. As weboweb mentioned, you'll have to use javascript or something server-side to track users.

    Here's something using dhtml I found via google.
     
    sgtsloth, Apr 15, 2009 IP