1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Activate cpa gateway "On Click"?

Discussion in 'CPA' started by cricket1, Oct 8, 2011.

  1. cricket1

    cricket1 Senior Member

    Joined:
    Jul 5, 2011
    Messages:
    1,086
    Likes Received:
    459
    I have seen content lockers popping out when a user clicks on a link instead of locking a page automatically.
    How is it possible to do so? I can't seem to find an answer to my question anywhere. There has to be some sort of code that can be added in the post or somewhere. Honestly, I know this would increase my CR.
     
  2. eternalfrost

    eternalfrost Regular Member

    Joined:
    Apr 9, 2011
    Messages:
    213
    Likes Received:
    54
    make a javascript function of whatever you want to happen when the visitor clicks.

    HTML:
    <script type="text/javascript">
    
         function myFunctionName(){
    
         //STUFF GOES HERE
    
         }
    </script>
    then whatever object you want to trigger the click even just add an event handler to the tag. for example,

    HTML:
    <div onclick="myFunctionName()" >
    you can add that to the body tag to cover the whole page.

    you can also use many other event handlers (look up the complete list) instead of 'onclick' to trigger your action after a given time, clicking only on a link, attempting to leave the page, etc etc
     
    • Thanks Thanks x 2
    Last edited: Oct 8, 2011