≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Cookie agreement box
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b]printuv[/b] wrote: What would you use to create a Cookie agreement box for visitor to agree to cookie settings etc. I cannot seem to think straight today. One the same as you have for this site would be perfect. I managed to find this on the forum. function hideCookieOverlay() { var slotname = "cookieOverlay"; try { localStorage.setItem(slotname, "hidden"); } catch(e) { } var b = document.getElementById("cookiearea51"); if (b != null) b.parentNode.removeChild(b); } function showCookieOverlay() { var slotname = "cookieOverlay"; var content = ''; try { content = localStorage.getItem(slotname); } catch(e) {} if (content == 'hidden') return; var tdiv = document.createElement('div'); tdiv.innerHTML = "<div style=\"text-align: center; position: fixed; bottom: 20px; width: 300px; right: 10px; background-color: rgb(221, 221, 221); border: 1px solid rgb(195, 195, 195); padding: 15px; font-size: 14px; font-family: Arial, Helvetica, sans-serif; opacity: 1;\" id=\"cookiearea51\">This website uses cookies to make it work. <br>See here for more details. <br/><br/><div style=\"vertical-align: bottom; border-radius: 5px; position:relative; display: inline-block; width:150px; height:40px; background-color:808080; color:ffffff;\"><div =\"hideCookieOverlay()\" style=\"cursor: pointer; display: table; width: 100%; height: 100%;\"><div style=\"display: table-cell; vertical-align: middle;\">I am OK with this.</div></div></div>"; var elem = tdiv.firstChild; document.body.appendChild(elem); var cookieAreaSetAlpha=function(a,c){c.style.filter="Alpha(Opacity="+a*100+")";c.style.MozOpacity=a;c.style.opacity=a}; var b=document.getElementById("cookiearea51"); d=(new Date).getTime(); e=0; if(b!=0) { cookieAreaSetAlpha(0,b); e=setInterval( function() {var a=((new Date).getTime()-d)/3E3; if(a>1) { cookieAreaSetAlpha(1,b); clearInterval(e); } else cookieAreaSetAlpha(a,b) },100); }; } showCookieOverlay(); And have inserted the above into a javascript container. Position etc is ok however how do I edit the script so as to create a link from the word (here) within the script to a GDPR page on the website. And also to be able to click on the (I am ok with this) within the script to close the box. Will this work in site preview, or do I need to publish for it to work correcly. It would also be great if I could also have a darker box around the (I am ok with this) just like the one on this site.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact