/    Sign up×
Community /Pin to ProfileBookmark

User Accept before browsing

Hello

I hope someone can help me…

I have a financial related website that requires users to accept our disclaimer before browsing. However, you can actually bypass this page if you type the url into the browser .eg mysite.com/services.html. We want to make the acceptance compulsary.

I have found a website who have done exactly this, and I looked at their source code:

<code class=”text10b”><strong>I confirm that I have read and understood the above information : </strong></code><a href=”JavaScript:func_disclaimer_accept()” class=”text10b-h”><b>Accept</b></a> | <a href=”JavaScript:func_disclaimer_decline()” class=”text10b-h”><b>Decline</b></a><br>

What I’d like to know is how to make the script that it refers to: =”JavaScript:func_disclaimer_accept()”

I really hope that someone understands as I really don’t have a clue!

Thanks in advance….

Michelle

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@konithomimoFeb 21.2006 — There are two things that you can do.

  • 1. Make sure that the referring page is your disclaimer page.


  • 2. Create a cookie when the user agrees to the disclaimer. If they have the cookie then let them view the page. If not then redirect them to the disclaimer page.


  • The code that you posted above is just to create two links that when clicked call either an accept function of a decline function.
    ×

    Success!

    Help @mcollins spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...