Hi. I am trying to make a lightbox for blogspot. So far everything went good. I just want to know if I can add some sort of cookie poart to the code below so that everytime someone visits my site it doesnt pop up every time. Thanks. Here is the HTML portion. <!-- Welcome page Start by http://bloggersentral.blogspot.com/ --> <!-- HTML part --> <div style="padding-top:15px;"> <a id="EPEntryButton" onclick="document.getElementById("HTML88").style.display="none";document.getElementById("Text88").style.display="none"">ENTER</a> </div> <div id="EPGrab"><a href="http://www.bloggersentral.com/2010/01/adding-entry-or-welcome-page.html" target="_blank">Make your own</a></div> <div id="EPDarkLayer"></div> <!-- CSS part --> <style> #welcome-wrapper{width:40%;margin:0 auto;height:0px;text-align:center;} /* welcome message widget */ #Text88, #EPEntryButton, #EPGrab {position:relative;z-index:510;top:100px;} #Text88 {background-color:#fff;border:solid 10px orange;color:#222;display:none;padding:15px;} #HTML88 {z-index:499;display:none;} /* DarkLayer div */ #EPDarkLayer {background-color:#000;opacity:0.6;filter:alpha(opacity=60);top:0px;left:0px;z-index:500;position:fixed;} /* Entry button */ #EPEntryButton {background-color:lawngreen;border:outset 3px #000;color:#333;cursor:pointer;font-size:25px;padding:5px;text-decoration:none;} #EPGrab {color:white;padding-top:10px;} </style> <!--[if IE 6]> <style> #EPDarkLayer {position:absolute;} </style> <![endif]--> <!-- Javascript part --> <script type="text/javascript"> YourBlogUrl="http://www.howtosk8board.blogspot.com"; //enter your blog url here fromInternal=document.referrer.search(YourBlogUrl); //check come from where getDarkLayer=document.getElementById("EPDarkLayer").style; getText88=document.getElementById("Text88").style; getHTML88=document.getElementById("HTML88").style; if (fromInternal == -1) { //if visitor comes from external page getDarkLayer.width=screen.availWidth+"px"; //set DarkLayer width getDarkLayer.height=screen.availHeight*2+"px"; //set DarkLayer height getHTML88.display="block"; //show DarkLayer getText88.display="block"; //show message } else { //if visitor comes from internal page getHTML88.display="none"; //hide HTML gadget getText88.display="none"; //hide message } </script> <!-- Welcome page End --> Code (markup):
Wow that is annoying and effectively will ensure you do not have a following, i suggest that you remove that popup and use a different one that has more options to control the amount of times per ip / per person it pops up for. I wish i had some code for you, ive struggled with this myself in the past and no longer use things like that as they really annoy ME firstly and any "Real" visitor.