Attention: Server migration delayed. - Please click [here] to read more! (Last update: Sunday, 21st of April, 08:45 PM/20:45, UTC+2, Europe)


Button + iframe
2017-09-19, 02:20 AM, (This post was last modified: 2017-09-20, 12:09 PM by hopsa.)
#1
So i'll add a button on my site and when they click on it, the button go away and the site that's linked on the button comes in an iframe.

Can someone help me with the html code please?

[Image: banner-lpb.gif]
Reply
Share This Thread :

2017-09-19, 03:07 AM,
#2
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>

<button id="my_button" onClick="show_iframe();">click me to show iframe</button>
<iframe id="my_iframe" src="http://www.example.com" style="display:none;"></iframe>

<script type="text/javascript">
var show_iframe = function(){
$('#my_button').hide();
$('#my_iframe').show();
}
</script>
Reply
2017-09-20, 12:07 PM,
#3
when I click on the button the site doesn't open??

[Image: banner-lpb.gif]
Reply
2017-09-21, 07:18 PM,
#4
(2017-09-20, 12:07 PM)hopsa Wrote: when I click on the button the site doesn't open??

Try this way:
<script>
var show_iframe = function(){
$('#my_button').hide();
$("#my_iframe").removeAttr("style");
}

</script>

Also, make sure the iframe is not blocked by AdBlock or some other ad-blocking plugin.
Reply


Related Threads
Thread Author Replies Views Last Post
  Lockers (with iframe and without) help needed. Will pay with PP bebriukas 1 1,245 2016-11-26, 02:56 PM
Last Post: MIG92
  Mobile traffic redirect after clicks on button Warriorcpa 2 1,614 2016-10-01, 05:54 PM
Last Post: Warriorcpa
  [HELP] How to make iframe 100% height and width ? ashu55 5 1,507 2016-07-02, 09:13 PM
Last Post: ashu55
  i need help in button Cpagrip vip2 6 1,341 2015-11-24, 07:38 PM
Last Post: SiriusBlack
  Facebook share button locker neroazzurro 2 1,206 2015-11-05, 02:01 AM
Last Post: SiriusBlack





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

Copyright © 2013 - 2019 by (company to be announced later)
Enhanced by MyBB
Return to top
This forum uses Lukasz Tkacz MyBB addons.