Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
Hide elements in iframe https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=6779 |
Page 1 of 1 |
Author: | connarONETIME [ 7. Apr 2020, 03:36 ] |
Post subject: | Hide elements in iframe |
Hi there, I'm trying to hide the menu from this page: https://www.tridentresults.com on here: https://onetime.sport/events/ I'm using this short code but can't get it to work: [advanced_iframe src="https://www.tridentresults.com" width="100%" height="1400" hide_elements=".header navbar yamm navbar-default navbar-static-top fixedheader,.fixedheader-spacer"] I managed to hide the menu using google console with this code: var all = document.getElementsByClassName('navbar yamm navbar-default navbar-static-top fixedheader'); for (var i = 0; i < all.length; i++) { all[i].style.display = 'none'; } var all = document.getElementsByClassName('fixedheader-spacer'); for (var i = 0; i < all.length; i++) { all[i].style.display = 'none'; } Please help! If you could provide the code to hide the footer as well that would be great. Thanks Connar |
Author: | TinyWebGallery [ 7. Apr 2020, 20:24 ] |
Post subject: | Re: Hide elements in iframe |
Hi https://www.tridentresults.com and https://onetime.sport/events/ are different domains! so you don't have direct access. You need to use the external workaround to hide elements in the iframe. Please see here: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message for a working example. If you don't have access then putting a kind of viewport over the iframe is the other option: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/show-only-a-part-of-the-iframe http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/hide-a-part-of-the-iframe Best, Michael |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |