iframe

How to make all links in an iframe open in new tab [duplicate]

浪子不回头ぞ 提交于 2019-12-28 06:30:09
问题 This question already has answers here : Make links inside an iframe open in a new window (6 answers) Closed 3 years ago . I'm trying to make it so when you click on a link in an <iframe> it will open the link in a new tab - not in the <iframe> . Please note I do not have control of the content the people are viewing through the <iframe> . I'm trying to do this with javascript possibly, like $('a').setAttribute('target','_blank'); but it's not working out for me. I also have in my HTML

Hide referrer on iframe

无人久伴 提交于 2019-12-28 05:46:09
问题 Is it possible to remove referrer when using iframe? here the case: I have a page at http://www.mywebsite.com with an <iframe> in it. Like this: <html> <head>...</head> <body> ... <a href="#loadiframe">SHow Website</a> <iframe id="#loadiframe" src="http://www.iframetarget.tld"> ... </body> </html> i want to iframetarget.tld not contains referrer/can not see if mywebsite.com is loading their pages. is that possible? Note: iframe will load using jQuery lightbox/colorbox 回答1: None of these

Back and forward buttons in an iframe

拈花ヽ惹草 提交于 2019-12-28 05:14:06
问题 How to "implement" back and forward buttons in an iframe with JS? 回答1: Use the window.history object. // For the current window window.history.back(); window.history.forward(); // For an iframe's window iframe.contentWindow.history.back(); iframe.contentWindow.history.forward(); or iframe.contentWindow.history.go(-1); // back iframe.contentWindow.history.go(1); // forward https://developer.mozilla.org/en/dom/window.history 回答2: Update for 2017: There is no way whatsoever to do this if the

Dreaded iframe horizontal scroll bar can't be removed in IE?

心不动则不痛 提交于 2019-12-28 05:10:07
问题 I have an iframe. The content is wider than the width I am setting so the iframe gets a horizontal scroll bar. I can't increase the width of the iframe so I want to just remove the scroll bar. I tried setting the scroll property to "no" but that kills both scroll bars and I want the vertical one. I tried setting overflow-x to "hidden" and that killed the horizontal scroll bar in ff but not in IE. sad for me. 回答1: scrolling="yes" horizontalscrolling="no" verticalscrolling="yes" Put that in

Which is the difference between srcdoc=“…” and src=“data:text/html,…” in an <iframe>?

删除回忆录丶 提交于 2019-12-28 04:59:05
问题 For example, which is the difference between these: <iframe srcdoc="<p>Some HTML</p>"></iframe> <iframe src="data:text/html,<p>Some HTML</p>"></iframe> Demo And, in case they are exactly the same, why did HTML5 add srcdoc attribute? Edit Maybe I wasn't clear enough. I am not comparing src with srcdoc , but src using text/html data URI with srcdoc . Then, if the functionality chart is like this | src attribute | srcdoc attribute -----------------------------------------------------------------

Change New Google Recaptcha (v2) Width

ε祈祈猫儿з 提交于 2019-12-28 04:51:05
问题 We've just started to implement the new google recaptcha as listed https://www.google.com/recaptcha/intro/index.html However the new method seems to be contained within an iFrame rather than embedded into the page thus making applying CSS more difficult. However we've got our form which is 400px wide so would like to have the recaptcha the same width. Currently it looks like, however we'd like it the same with as the rest. Does anybody know how to do this yet? Thanks 回答1: Here is a work

Detect when an iframe is loaded

做~自己de王妃 提交于 2019-12-28 04:23:08
问题 I'm using an <iframe> (I know, I know, ...) in my app (single-page application with ExtJS 4.2) to do file downloads because they contain lots of data and can take a while to generate the Excel file (we're talking anything from 20 seconds to 20 minutes depending on the parameters). The current state of things is : when the user clicks the download button, he is "redirected" by Javascript ( window.location.href = xxx ) to the page doing the export, but since it's done in PHP, and no headers are

iframe contents cant appear in Firefox

百般思念 提交于 2019-12-28 02:57:24
问题 Below is my code: <div style="border: solid 1px #000000; margin: 5px;"> <iframe src="http://www.w3schools.com" width="100%" height="300px" scrolling="yes"><p>Your browser does not support iframe.</p></iframe> </div> Contents of iframe works well in chrome but not in firefox. I've disabled add-ons but my iframe is still empty. Can anyone please help me? 回答1: If you are trying to add this Iframe on a SSL-encrypted website (https://), it won't work any more since Firefox 23 because Mozilla has

Check if parent window is iframe or not

岁酱吖の 提交于 2019-12-28 02:29:28
问题 How can I tell from a page within an iframe, if the parent itself is also within an iframe? Explanation: My home page home.html contains an iframe <iframe src="sample.html"></iframe> I need to detect if home.html (ie: parent of sample.html ) is within an iframe. Code in sample.html : if(self==window) { alert('home.html is not in iframe'); } else { alert('home.html is in iframe'); } My question is not a duplicate. It's a different case. 回答1: This is true if a window is not a frame/iframe: if

Apply a Greasemonkey/Tampermonkey/userscript to an iframe?

Deadly 提交于 2019-12-28 02:08:47
问题 The title is pretty much the question: Is it possible to add a Greasemonkey script to an iframed website? If so, how? Thank you. 回答1: In Greasemonkey (And Tampermonkey and most userscript engines) a script will fire on an iframe automatically if it meets the @include, @exclude, and/or @match directives. And, a popular question is how to stop Greasemonkey from firing on iframes. So, if your script had a match like: @match https://fiddle.jshell.net/* It would fire on jsFiddle "output" pages