Is it possible to create an iframe on click of a button?
2016-02-21, 09:10 AM,
(This post was last modified: 2016-02-21, 09:12 AM by hawdaze.)
#1
Is it possible to launch an iframe with the click on a button with html?


The button:

Code:
</div>&nbsp;&nbsp;<a class="check btn btn-danger" role="button">Unlock</a>&nbsp;&nbsp;<a href="http://siteiwanttoiframe.com/" target="_blank" class="btn btn-info">Generate Unlock Code</a><br><span class="msg" style="display:none;color:green;position:relative;font-size:12px;margin:auto auto auto 20px;font-weight:bold;margin-left: 35px;">Success!</span>
<br><br>

The iframe code:

Code:
<iframe id="myframe" src="http://siteiwanttoiframe.com/" width="350" height="200" scrolling="yes" frameborder="0" style="margin-left: -30px;"></iframe>

Yikes! Sorry I accidentally posted this in the wrong section....admin please move it?
Reply
2016-02-21, 04:28 PM,
#2
(2016-02-21, 09:10 AM)hawdaze Wrote: Is it possible to launch an iframe with the click on a button with html?


The button:

Code:
</div>&nbsp;&nbsp;<a class="check btn btn-danger" role="button">Unlock</a>&nbsp;&nbsp;<a href="/" target="_blank" class="btn btn-info">Generate Unlock Code</a><br><span class="msg" style="display:none;color:green;position:relative;font-size:12px;margin:auto auto auto 20px;font-weight:bold;margin-left: 35px;">Success!</span>
<br><br>

The iframe code:

Code:
<iframe id="myframe" src="/" width="350" height="200" scrolling="yes" frameborder="0" style="margin-left: -30px;"></iframe>

Yikes! Sorry I accidentally posted this in the wrong section....admin please move it?

Just modify this code to suit your needs, the "http://hostsite.com/" is basically the content you want to display along with the Button.

Code:
<script>
function postYourAdd () {
    var iframe = $("#forPostyouradd");
    iframe.attr("src", iframe.data("src"));
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<button id="postYourAdd" onclick="postYourAdd()">Unlock</button>
<iframe id="forPostyouradd" data-src="http://siteiwanttoiframe.com/" src="http://hostsite.com/"

width="350" height="200" style="background:#ffffff"></iframe>

I hope this helps.
Latest Thanks - View all

hawdaze(2016-02-22 03:12 AM) 
Reply
2016-02-22, 03:13 AM,
#3
(2016-02-21, 04:28 PM)caesar Wrote:
(2016-02-21, 09:10 AM)hawdaze Wrote: Is it possible to launch an iframe with the click on a button with html?


The button:

Code:
</div>&nbsp;&nbsp;<a class="check btn btn-danger" role="button">Unlock</a>&nbsp;&nbsp;<a href="/" target="_blank" class="btn btn-info">Generate Unlock Code</a><br><span class="msg" style="display:none;color:green;position:relative;font-size:12px;margin:auto auto auto 20px;font-weight:bold;margin-left: 35px;">Success!</span>
<br><br>

The iframe code:

Code:
<iframe id="myframe" src="/" width="350" height="200" scrolling="yes" frameborder="0" style="margin-left: -30px;"></iframe>

Yikes! Sorry I accidentally posted this in the wrong section....admin please move it?

Just modify this code to suit your needs, the "/" is basically the content you want to display along with the Button.

Code:
<script>
function postYourAdd () {
    var iframe = $("#forPostyouradd");
    iframe.attr("src", iframe.data("src"));
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<button id="postYourAdd" onclick="postYourAdd()">Unlock</button>
<iframe id="forPostyouradd" data-src="/" src="/"

width="350" height="200" style="background:#ffffff"></iframe>

I hope this helps.

Thanks a lot man! It's working :D
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  New to CPA trying to create a keygen vla2110 5 217 Yesterday, 11:45 AM
Last Post: cellmind3
  Need Download Button Ads insomniac 5 161 2017-09-11, 08:17 PM
Last Post: callieseye
  Content locker on button click OGAds blunt 13 849 2017-09-06, 10:27 PM
Last Post: Nebojsha1337
  See my recent click with no lead for more CPA warrensandre25 7 208 2017-09-05, 04:45 PM
Last Post: warrensandre25
  Gumtree Ads with an Apply Button? Does anybody know how? Stewmath 1 95 2017-09-05, 12:04 AM
Last Post: Sonu8c4




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

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