Check Age

elena31

New member
Good evening, I have a problem to solve.
I downloaded a script for verifying the age of access to a website from this address:
Let's create a jQuery Plugin that checks user's age when visiting your site. -Michael Soriano

I uploaded everything to the site and the popup for entering the age opened.
I put the link in the "redirect to" section in the script, but when I enter the date of birth as the age of majority, the popup disappears and the page below remains.
If, on the other hand, I enter the date of birth as a minor, the popup remains and there it stops with the message "Sorry you are not old enough to view this site".

I am attaching the zip file of the script, hoping someone can help me.
I state that I don't know how to program in php or javascript, I just found this script online, it seems interesting to me and I would like to use it.

Thank you.
 

Attachments

  • age-check-master.zip
    22.4 KB · Views: 12
Please share the github (or other website where the code is available) next time.
I pushed the code to github to browse the code much more simplier: https://github.dev/Public-PHP-Projects/CheckAge

Let's check the code in work: https://htmlpreview.github.io/?https://raw.githubusercontent.com/Public-PHP-Projects/CheckAge/master/index.html

you need to pass the redirectTo and redirectOnFail properties to the script's settings:
Code:
                $.ageCheck({
                    minAge,
                    redirectTo: '/index.html?success',
                    redirectOnFail: '/index.html?fail',
                });
 
Back
Top