iframe

How to stop the iframes from blinking?

痞子三分冷 提交于 2020-01-17 03:34:57
问题 I have a html page in which i have a div . Inside the div there is an iframe , <div id="div1"> <iframe id="biframe" src="" allowtransparency="true" application="yes" > </iframe> </div> In javascript function I'm changing the src of the iframe dynamically. window.frames['biframe'].document.location.href="105.htm"; $('div1').style.display="block"; The above 2 lines will be called in a button click, the div will be displayed and the iframe will be loaded. Problem : When the button is clicked the

access javascript ckeditor object within an iframe

最后都变了- 提交于 2020-01-17 02:20:13
问题 Lets say I have a page with an iframe and within the iframe I have a ckeditor instance that I want to destroy from the containing page. I would usually try something like this: var iframe_document = document.getElementById("iframe_id").contentWindow.document; for(var i in iframe_document.CKEDITOR.instances) iframe_document.CKEDITOR.instances[i].destroy(); However it appears that the ckeditor instance can not be accessed this way. Is it possible to destroy the instance from outside the

Change to content of IFRAME. Inject script into IFRAME from another IFRAME

和自甴很熟 提交于 2020-01-17 01:21:21
问题 I am working on a script to get and change the content of an IFrame, by accessing a variable and a function defined in it, through a button and a Javascript script created in another IFrame. The script works fine, but what I would like to do is instead of text been injected in the IFRAME 1 I would like to inject a script, something like: <script src="map.js" type="text/javascript"></script> I have tried with injecting IMG and also works: <button onclick="f_ifr2('<img height=\'410\' src=\

iframe with aspx page makes page stop rendering

落花浮王杯 提交于 2020-01-16 19:04:08
问题 I have an iFrame inside my index page. This iFrame contains an aspx page with a form inside it, with runat=server . For some weird reason, anything I add after the iFrame is not being rendered to the page. I tried adding text, a div, nothing is being added after when I run the page. Code: <body> <asp:Panel ID="Panel1" runat="server" Height="80px"> <iframe name="LogoFrame" id="LogoFrame" src="asp/Logo.aspx" scrolling="no" style="border-style: hidden; padding: 0px; margin: 00px; width: 100%;

Angular: Prevent DomSanizer from updating on DOM Events

谁都会走 提交于 2020-01-16 16:54:10
问题 I'm facing an issue with DomSanitizer . I've created a StackBlitz that replicate this issue. Every time the button is clicked, the iframe A is reloaded. The button does absolutely nothing - so it is not related to the iframe. iframe A has a dynamic reference to its source. To make this work I use the DomSanitizer . iframe B has a static reference and no reload here - whats I expected. Just to show it is related to the sanitizer. So I need to have an iframe in my application and its content

Angular: Prevent DomSanizer from updating on DOM Events

蓝咒 提交于 2020-01-16 16:51:09
问题 I'm facing an issue with DomSanitizer . I've created a StackBlitz that replicate this issue. Every time the button is clicked, the iframe A is reloaded. The button does absolutely nothing - so it is not related to the iframe. iframe A has a dynamic reference to its source. To make this work I use the DomSanitizer . iframe B has a static reference and no reload here - whats I expected. Just to show it is related to the sanitizer. So I need to have an iframe in my application and its content

什么是跨域,如果本地开发遇到跨域怎么解决

谁都会走 提交于 2020-01-16 10:49:15
跨域是浏览器的同源策略造成的,浏览器为了自身的安全功能,协议、域名、端口有一个不一致,就不允许跨域请求资源 1.前端跨域拿数据方法(具体实现自行搜搜) https://segmentfault.com/a/1190000020686142?utm_source=tag-newest (1)document.domain+iframe(主域相同,子域不同) 强制设置document.domain为基础主域,实现了同域 (2)location.hash+iframe(通过中间页c来实现,利用iframe的location.hash传值)    (3)window.name+iframe(通过iframe的src属性从外域转向本域,跨域数据就从iframe的外域window.name转向本地域) (4)window.postmessage 2.跨域请求 (1)Jsonp(只能get请求)  var script=doucument.createElement(‘script’) script.type=’text/javascript’  script.src=”http://www.domain2.com:8080/login?userName=admin&callback=handleCallback”  document.head.appendChild(script) /

On change input in parent send val to iframe with update

半腔热情 提交于 2020-01-16 08:40:30
问题 I need update iframe's content on input[text] changed(or on some another event). For example: I'm typing in parent's input "Hello World!!!", and iframe's <h1>Hi</h1> is changing to <h1>Hello World!!!</h1> symbol by symbol. Better if solution will be on jQuery, but vanilla js is ok, too)) Thank you very much. P.S. Sorry for my bad English( 回答1: better way is using Window.postMessage => https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage parent Page: <!DOCTYPE html> <html lang=

Override CSS in an iframe

给你一囗甜甜゛ 提交于 2020-01-16 08:39:09
问题 On this page, the form is an iframe provided by JotForm. I want to left-align the form, and reduce the padding around the LI elements that contain the text fields. In Magento Go (the website platform hosting the website), I have entered the following code into custom.css: iframe#40142457787864 form#40142457787864 .form-all {margin: 0 !important;} iframe#40142457787864 form#40142457787864 .form-line {padding: 4px 0 !important;} However, this is not being applied by the browser. Why not? 回答1:

JS实现刷新iframe的方法

别等时光非礼了梦想. 提交于 2020-01-16 06:42:31
<iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe> 方案一:用iframe的name属性定位 <input type="button" name="Button" value="Button" onclick="document.frames('ifrmname').location.reload()">   或 <input type="button" name="Button" value="Button" onclick="document.all.ifrmname.document.location.reload()">   方案二:用iframe的id属性定位 <input type="button" name="Button" value="Button" onclick="ifrmid.window.location.reload()">   终极方案:当iframe的src为其它网站地址(跨域操作时) <input type="button" name="Button" value="Button" onclick="window.open(document.all.ifrmname.src,'ifrmname','')"> 代码如下:<input type=button value=刷新