Content locker on button click OGAds
2017-04-26, 06:25 AM,
#1
Hey guys, quick question, so I'm editing this landing page template here and want to test out my content locker, here's my content locker code (I already added it into the <head>:

And the onclick code is: call_locker();

Here's the HTML snippet of the part I need the locker in:

Any help? I'm a total beginner at this, so please don't judge me, thanks!
Reply
2017-04-26, 04:39 PM,
#2
I think you need to put the content code that you want to lock before this </script> .

p.s i am also noob to HTML.
Reply
2017-04-26, 04:44 PM,
#3
Insert another script like this one:

Code:
<script>
document.getElementById('your_submit_button').onclick=function(){call_locker();}
</script>


You have to replace your button with an element that has an id, something like this:

Code:
<button  type="submit" id="your_submit_button">Submit</button>


The id must matches the selected element in your JavaScript code ("your_submit_button").

Hit me up if you have other questions.
Reply
2017-04-26, 04:59 PM,
#4
Just put the first script in the <head> section

and for the Onload function use something like this

PHP Code:
<button id="submit" class="btn" onclick="og_load();">Some text here</button

I used the onclick function here instead of call_locker(); ( Both are same though Hehe) and will work!

The thing is simple, you just need to put script in the head and use the call function to call the locker.

Another Example:

PHP Code:
<button onclick="og_load();" type="button" class="btn-1 btn-danger btn-large dl_button"><class="glyphicon glyphicon-download-alt"></iVerify Now</button

Basically its
PHP Code:
<button onclick="og_load();">Verify Now</button
Latest Thanks - View all

blunt(2017-04-26 06:49 PM) 
Reply
2017-04-26, 05:23 PM,
#5
(2017-04-26, 04:44 PM)dbiz Wrote: Insert another script like this one:

Code:
<script>
document.getElementById('your_submit_button').onclick=function(){call_locker();}
</script>


You have to replace your button with an element that has an id, something like this:

Code:
<button  type="submit" id="your_submit_button">Submit</button>


The id must matches the selected element in your JavaScript code ("your_submit_button").

Hit me up if you have other questions.

Hello, dbiz! Thank you lots for the help, although I get this error when trying to put the first code in the .html :/

https://gyazo.com/4d17887491c739099ad0114b84829238

Thanks!

(2017-04-26, 04:59 PM)Gbugmenot Wrote: Just put the first script in the <head> section

and for the Onload function use something like this

PHP Code:
<button id="submit" class="btn" onclick="og_load();">Some text here</button

I used the onclick function here instead of call_locker(); ( Both are same though Hehe) and will work!

The thing is simple, you just need to put script in the head and use the call function to call the locker.

Another Example:

PHP Code:
<button onclick="og_load();" type="button" class="btn-1 btn-danger btn-large dl_button"><class="glyphicon glyphicon-download-alt"></iVerify Now</button

Basically its
PHP Code:
<button onclick="og_load();">Verify Now</button

Hello Gbug! Thanks for the help! Although when I type in the code to my .html and load the index file in my browser, I can in fact see the button, although it doesn't open up the content locker, might it be the problem, that I run it on a localserver and not an actual host? Thanks!
Reply
2017-04-26, 06:03 PM,
#6
(2017-04-26, 05:23 PM)Meda Wrote:
(2017-04-26, 04:44 PM)dbiz Wrote: Insert another script like this one:

Code:
<script>
document.getElementById('your_submit_button').onclick=function(){call_locker();}
</script>


You have to replace your button with an element that has an id, something like this:

Code:
<button  type="submit" id="your_submit_button">Submit</button>


The id must matches the selected element in your JavaScript code ("your_submit_button").

Hit me up if you have other questions.

Hello, dbiz! Thank you lots for the help, although I get this error when trying to put the first code in the .html :/

https://gyazo.com/4d17887491c739099ad0114b84829238

Thanks!

Tried to simply save it? It should work without any problem, as there is no special character in my snippet.


And as you are not experienced with HTML/JavaScript you should use this code, because I guess you have no function that checks for document ready:

Code:
<script>
window.onload = function() {
document.getElementById('your_submit_button').onclick=function(){alert(2);};
};
</script>

And for the code from Gbugmenot you may have the problem, that the called onclick function is wrong, it is og_locker() instead of call_locker() ... try this code:

Code:
<button onclick="call_locker();">Verify Now</button>
Reply
2017-04-26, 06:12 PM,
#7
(2017-04-26, 05:23 PM)Meda Wrote: Hello, dbiz! Thank you lots for the help, although I get this error when trying to put the first code in the .html :/

https://gyazo.com/4d17887491c739099ad0114b84829238

Thanks!

What you could do here is u can simply press save as and at the bottom of save as dialog choose Unicode from the dropdown and click save or u can simply use notepad ++ to edit these and this problem won't pop up.

(2017-04-26, 05:23 PM)Meda Wrote: Hello Gbug! Thanks for the help! Although when I type in the code to my .html and load the index file in my browser, I can in fact see the button, although it doesn't open up the content locker, might it be the problem, that I run it on a localserver and not an actual host? Thanks!

Well that happened to me once when the onclick thing was not working on the localhost but was working on the actualhost. So, try uploading your LP to a free host like 000webhost and check if it works and if it doesn't then try what dbiz said above.
Latest Thanks - View all

blunt(2017-04-26 06:49 PM) 
Reply
2017-04-26, 06:16 PM,
(This post was last modified: 2017-04-26, 06:41 PM by dbiz.)
#8
@"Meda"

I've just made up two small examples of the methods mentioned here:

Number one:
Code:
<html>
<head>
<title>Test 1 for Meda</title>
<script>
window.onload = function() {
document.getElementById('your_submit_button').onclick=function(){alert(2);};
};
</script>
</head>
<body>
<button  type="submit" id="your_submit_button">Submit</button>
</body>
</html>

Number two
Code:
<html>
<head>
<title>Test 2 for Meda</title>
</head>
<body>
<button  type="submit" id="your_submit_button" onclick="call_locker();">Submit</button>
</body>
</html>



Edit: Of course you still have to insert your OGads code (you posted it above) into the head section of the code. I didn't do it, so you can later easily remove your personal code out of the starting post and so others won't copy paste your code by accident. It is just a template. :)
Latest Thanks - View all

blunt(2017-04-26 06:49 PM) 
Reply
2017-04-26, 06:51 PM,
#9
apparently the problem was that I was doing it in localhost, when I tried it in a server, everything worked out!

Thank you all for giving me some time from your day to help me! Love you all and god bless.
Reply
2017-04-28, 02:37 AM,
(This post was last modified: 2017-04-28, 02:37 AM by Gbugmenot.)
#10
Yes it happens to me also, you need to actually upload it to server as it requires the script to load the lockers.

2nd thing. dbiz

The code is absolutely right you might need to check the OGads content lockers page, it is indeed. call_locker();

Anyways it is how you load the script, he's not that pro in all this and i am not that much noob so i have other ways to load the lockers but the code i gave was the basic one.

Cheers! it did worked for you
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  OGAds - Weekly Payments - Landing Pages - Mentor - Hot Offers OGAds 366 48,679 2017-10-22, 06:52 PM
Last Post: Endeavour
  any working facebook share or like locker right now? Fierce 5 219 2017-10-17, 04:10 PM
Last Post: Fierce
  Anyone having tips on marketing content locker LilDog 1 104 2017-10-15, 10:34 AM
Last Post: NAPK1NS
  Video Content Locker Med Fd 1 99 2017-10-05, 10:54 PM
Last Post: timilak65
  torrent' content locker Med Fd 2 90 2017-10-03, 10:46 PM
Last Post: Med Fd




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top