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

Content locking pop-up question

Discussion in 'CPA' started by vahnz13, Jun 5, 2012.

  1. vahnz13

    vahnz13 Regular Member

    Joined:
    Jun 19, 2011
    Messages:
    302
    Likes Received:
    57
    Hi guys, I need a little help here. I want to set up content locking on my site, but I want the gateaway show up when some one click the download button on my page. I try to read the blamads and mgcash tutorial, but I'm really suck at HTML coding anyway :p

    Anyone please help me with this :eek:
     
  2. darkrache

    darkrache Junior Member Premium Member

    Joined:
    Mar 27, 2011
    Messages:
    148
    Likes Received:
    162
    Using javascript, you can enable the script (such as the blamads javascript) to run only when the button is clicked. Look up javascript buttons and the "onclick" event.
     
  3. vahnz13

    vahnz13 Regular Member

    Joined:
    Jun 19, 2011
    Messages:
    302
    Likes Received:
    57
    can you tell more details dude? I swear to God that I'm really, really suck at this :p
    Give me more example please..
     
  4. cookiemonste

    cookiemonste Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 9, 2009
    Messages:
    209
    Likes Received:
    91
    Code:
    [COLOR=#000000][FONT=courier new]<img src="[/FONT][/COLOR][I]downloadbutton.png" alt="[I]Download" onclick="startblocker()" />[/I][/I]
     
  5. darkrache

    darkrache Junior Member Premium Member

    Joined:
    Mar 27, 2011
    Messages:
    148
    Likes Received:
    162
    Code:
    [TABLE]
    [TR]
    [TD]<script language="JavaScript">[/TD]
    [/TR]
    [TR]
    [TD][/TD]
    [TD]function startblocker() {[/TD]
    [/TR]
    [TR]
    [TD][/TD]
    [TD]//erase this and put your code for your unlocker here[/TD]
    [/TR]
    [TR]
    [TD][/TD]
    [TD]}[/TD]
    [/TR]
    [TR]
    [TD][/TD]
    [TD]</script>[/TD]
    [/TR]
    [/TABLE]
    
    Put that around the top of your file, and using the code provided by cookiemonste, together they will load the content locker upon the image (or you can change it to a button like so)

    Code:
    <button type="button" onclick="startblocker()">Unlock Content</button>