I need to ask whether or not a user is 18 years old or not and I do not want to create a separate splash page. My thought is that using shadowbox.js and creating an on-load pop-up message would be the best solution. Is there any documentation on how to create such a solution? Also, based on the research I have done I would want to set a cookie as well so that a user who goes back to my home page does not have to re-verify that they are 18+.
Thanks in advanced.
[[ Is it possible to set-up a cookie so that this only displays ONE time and if so is there a solution that does NOT involve PHP? ]]
I would create a separate page and load the contents of that page via AJAX into your lightbox. That way, you can handle the use-case scenario of browsers that have Javascript disabled.
The rest is exactly like you say: check for a cookie, if it isn't there, show the lightbox.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.