Hi, First, I am absolute javascipt newbie so please threat me like that.. )) I need the following functionality to my webpage: Let's say I have a div with some unique ID on my page. Now, what I need is to show this div on my page only the first time visitor opens a page, and then not show it every next time he/she opens it for next 24h. So I need to set a cookie that hides div from page if it has already been shown to visitor, for next 24h, so that the content of this div will be shown to each unique visitor only once for a day. Thanks in advance... Nikola
You might wanna look to serverside scripting for that - it's very easy to do in PHP, for instance. All you would have to do there is set the cookie, and then later check if the cookie exist: if (isset($_COOKIE['hidediv'])) {} else { echo "<div>something here</div>";}
cookie also is very easy to use, view source code of script below to solve your problem - Only Popup Once