iframe

Print two contentWindows as one within an iFrame

守給你的承諾、 提交于 2019-12-25 03:34:44
问题 I have a webpage with multiple iFrames e.g. 6 and I'd like to be able to print 2 of those frames as one call rather than grabbing the contentWindow of each frame and then calling: parent.iFrame1.focus(); parent.iFrame1.print(); parent.iFrame2.focus(); parent.iFrame2.print(); as it prints the contents in two separate print preview windows in the browser. I tried the following but none really give me what I'm looking for or work for me (i.e. the content is truncated) Is it possible to do or am

Wordpress Site Admin can't publish <iframe>s on multsite network

我们两清 提交于 2019-12-25 03:31:57
问题 I have a Wordpress multisite network. I've found that if you're not a Network Admin, Site Admins cannot publish <iframe>s or <script> tags. What I've tried: Added the unfiltered_html capability to the Admin role Added iframe to the global $allowedtags Added iframe to the extended_valid_elements using the tiny_mce_before_init filter I've read around a lot, and I know there's an Iframe plugin, but It would really be best to allow my users to copy and paste Iframes from YouTube, etc. Any insight

Add event to iframe body

淺唱寂寞╮ 提交于 2019-12-25 03:14:39
问题 I am setting up a own made wysiwyg plugin for jQuery. He is almost finished but know i want to add a keyup event to a iframe with designmode on. But i can't get it worked. I tryied almost everything a found on the internet. The class of the wysiwyg iframe with designmode is .dhwysiwyg. I though the next code will work: $(function () { $('.dhwysiwyg', container).keyup(function () { // the script }); }); But this won't work. The keyup event don't exists. Can someone help me? Tom 回答1: Does the

Angular - Inject custom css file to an iframe

一世执手 提交于 2019-12-25 03:13:33
问题 I'm trying to inject a CSS file to a third party iframe that I need to change the styling. I thought of using ngOnInit() { ... this.myIframe.nativeElement.document.head.appendChild('style.css') } but it is not working for some reason beyond my grasp. Any help will be appreciated. Cheers 回答1: This workaround will work if your Iframe is not from a different domain. You will get a cross-browser error. Template <iframe #myIframe></iframe> Component @ViewChild('myIframe') public myIframe; ........

Wikis - Is there a wiki in which one can create, within a page, “windows” (partial frames) to other pages? [closed]

拜拜、爱过 提交于 2019-12-25 02:59:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . In a "classic" wiki application one creates pages and uses hyperlinks inside the content of the pages to link them together in a meaningful way. Is there a wiki that allows one to "pull" content from another page into your own? (as in create something similar to an HTML snippet that shows the content of another

Javascript/Jquery: Auto adjust height of iframe (how to make iframe smaller when needed)

杀马特。学长 韩版系。学妹 提交于 2019-12-25 02:38:09
问题 I have the following code that makes the iframe taller once text exceeds iframe visible height; however, when text is removed, the iframe remains just as tall. How do I modify this code (or if there is a different code) that will adjust the iframe to be JUST the right height. I need this to be in a function so that on keyup I can run the function. function autoResize(id){ var newheight; var newwidth; if(document.getElementById){ newheight=document.getElementById(id).contentWindow.document

Change fancybox iframe size according to content height/width

可紊 提交于 2019-12-25 02:37:27
问题 This might be tricky because the iframe content height/width depends on whether or not the user has the Flash plugin. The iframe has a maxwidth of 800px, so it scales according to viewport. It loads swfobject.js, which detects the Flash plugin, and swiffit.js, which scales the swf according to the width of the iframe. If there is no Flash plugin, it loads an mp4 video, with a fixed width of 550px. I did a dummy of it here: http://www.casedasole.it/fancyfit/ The first button opens an iframe

How to get access of <iframe> body using c++/ATL/COM?

大兔子大兔子 提交于 2019-12-25 02:34:10
问题 I have written a browser helper object to get the text between the tags and use it for data mining purpose. I tried using it on igoogle (basically to test its capability on gadgets) and it failed in some of the cases where an <iframe> is present with some external source. I can get the <div> and its child <iframe> but fail to get the body. I get the frame collection from this API HRESULT IHTMLDocument2::get_frames(IHTMLFramesCollection2 **p); The problem can be re-created in igoogle and

Message Event Handler Exist or not in window object

妖精的绣舞 提交于 2019-12-25 02:30:03
问题 i have a page in html contains iframe.if message comes from iframe i have to handle it.but how to check if message event handler exist or not my code is $(window).on('message',function(e){ console.log(e.originalEvent.data); }); when button is clicked this code set message event handler.but when again clicked again message handler get added .Is there any method to know if in window object is message event handler present or not.Please guideline.i can't use global variable in my case.if its

Capybara How to use within_frame for the only iframe in the page without id

守給你的承諾、 提交于 2019-12-25 02:28:19
问题 I have an in the the page that I need to test with Cucumber and Capybara, the iframe does not have a class or id attribute but it's the only iframe on the DOM. How can I use the within_frame capybara method? 回答1: use find to get the element and pass it to the within_frame method. iframe = find('iframe') within_frame(iframe) do # expect something here end 回答2: If you're using a recent version of Capybara the locator argument to within_frame is optional if there's only one iframe on the page