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
Share This Thread :

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.

[url=][High Quality] [/url]
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


Related Threads
Thread Author Replies Views Last Post
  What do you use to create a Landing Page? grahammiranda13 2 145 2018-07-21, 08:53 AM
Last Post: affmarketer101
  What CPA or other link / click methods do you use ? LorenzoSupreme 1 118 2018-07-18, 07:05 AM
Last Post: CharlieHarper
  CPABuild/ogads Iframe button immart247 2 187 2018-07-16, 07:19 AM
Last Post: immart247
  Button Install to offer?? wxp100 0 85 2018-07-07, 11:24 PM
Last Post: wxp100
  create landing page on blogge outgllat 1 114 2018-07-03, 03:34 PM
Last Post: CharlieHarper





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

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