iframe

iframe with pointer-events: none; but with a div inside it that has pointer-events: auto;

ぃ、小莉子 提交于 2019-12-12 11:42:29
问题 It is possible to have an outer div with pointer-events: none; and another div inside it with pointer-events: auto;. The outer div will be transparent to click events (ie it won't react to click events but underlying html controls will) and the inner one will. However, I now have a scenario where I need to do the same thing with an iframe, but it is not working. I set pointer-events: none; on the iframe, but then the inner divs that should be clickable are not even if they have pointer-events

Iframe with pdf black flickering(blinking)

一笑奈何 提交于 2019-12-12 11:19:05
问题 I have an iframe with pdf on my page and try to disable scrolling of main window while scrolling iframe. Here is the code for it: $('iframe') .mouseover(function () { var html = $('html'); html.data('previous-overflow', html.css('overflow')); html.css('overflow', 'hidden'); html.css('margin-right', '17px'); }) .mouseout(function () { // un-lock scroll position var html = $('html'); html.css('overflow', html.data('previous-overflow')); html.css('margin-right', '0px'); }); But such css changes

javascript, iframe - navigate/close parent window from iframe

跟風遠走 提交于 2019-12-12 10:57:31
问题 Good day to all. I have this setup: One page with text/whatever, that also includes an iframe (the page in iframe is created by me so I have access to it, I can modify its content). What I need to do is that when I access a link from the iframe to open it on the mother page (navigate). Until now I kind of failed to do that so any help would be appreciated. For any further info just ask. 回答1: In all of the links that you want to affect the parent window do something like this: <a href=

How to get parent URL in a shiny-app

陌路散爱 提交于 2019-12-12 10:53:32
问题 I embedded a Shiny application with an iframe in my website, and I am now trying to protect my Shiny application : I want the iframe to be reachable only in my website, not directly with its URL. <iframe name="rshiny" src="http://url-of-my-shiny-app/" style="border: none; width: 100%;height:800px;"> </iframe> To do that, I am trying to get the URL of the parent which contains the iframe inside of my Shiny-app, and block it whether it's not the good website. The problem is : I found how to get

onload event for dynamically created iframe never fires in IE

前提是你 提交于 2019-12-12 10:49:23
问题 I have an issue with IE where the iframe's "onload/load" events will not fire when I dynamically create the iframe, set its source to a pdf and append it to the document. The reason I need to listen for the event is because I need to hide the iframe until the frame has loaded and then use some effects to fade it into view. I've got this to work in every browser I've tested in (Chrome, Firefox, Safari, mobile Safari), but it will not work in IE8->IE11. I've seen lots of posts about how IE

Error loading youtube video in modal dialog with chrome

风流意气都作罢 提交于 2019-12-12 10:48:00
问题 I created a modal dialog to play youtube videos in. When the user clicks on a thumbnail image of the video it opens the dialog and injects the youtube iframe with this line of jQuery: videoModal.html("<iframe class='youtube-player' id='youtube-player' type='text/html' width='640' height='385' src='http://www.youtube.com/embed/" + videoId + "?autoplay=1' frameborder='0'></iframe>"); I get the following error only in Chrome, all other browsers do not complain Unsafe JavaScript attempt to access

firefox报错: attempt to run compile-and-go script...

会有一股神秘感。 提交于 2019-12-12 10:44:51
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 此类错误只出现在低版本的firefox中, 如firefox10. firefox17及以上版本, chrome没有这个问题. 项目组的产品还在支持firefox10, 所以必须解决掉它. 导致 问题的原因是: 某个子iframe中的脚本在父层窗口的对象中绑定一个事件, 后面这个iframe被删除了. 当父窗口的事件被触发时就会报错: attempt to run compile-and-go script on a cleared scope. 可能是低版本的firefox在删除iframe及scope时没有查看引用关系. 这种处理方式 简单粗暴, 但 可以解决隐性的内存泄漏问题. 高版本保留scope的处理方法, 不报错, 合乎逻辑, 却又可能导致内存泄漏: iframe删掉了, 因为scope被外层的一个事件引用而被保留. 如果scope中的内容较多, 或者会多次创建和删除, 内存就会涨上去. 定位过程 一开始希望通过在firebug中打断点来定位问题. 但是在这种情况下, 浏览器根本不会执行事件回调函数. 估计是在准备执行上下文的时候就报错了. 后面希望通过在代码中搜索关键字来定位. 但是此业务模块的js代码写的就是一坨一坨的, 看着头都大了. 而且负责人也交接了好几轮.

Check if page is in Iframe for Google Chrome

心不动则不痛 提交于 2019-12-12 10:44:32
问题 I have tried many properties of window to see if a page in an iframe can tell if it is in an iframe. I have tried: if(top.location!= self.location) //doesn't work in Google Chrome alert("I am in an iframe!") And this doesn't work (works on all browsers but Chrome). I am writing a userscript for Firefox and Chrome but Chrome really doesn't behave. Is there a way to tell if Chrome can detect if its page is in an iframe? 回答1: This works for frames I would assume it also works with iFrames if

How to get parent iframe element from inner page without knowing id?

落爺英雄遲暮 提交于 2019-12-12 10:38:33
问题 Let's imagine that I have something like this: <html> ... <div> <iframe src="test.html" hash="r4d5f7"></iframe> <iframe src="test.html" hash="8f7x97"></iframe> <iframe src="test.html" hash="gg4v5e"></iframe> <iframe src="test.html" hash="e54f87"></iframe> </div> ... </html> test.html is empty page, custom hash attribute always has a different value, both pages are on the same domain for security reasons, number and order of iframe elements is random. My question is: Is there a way to get from

iframe CSS3 scaling issue on iPad Safari (iOS 5.0.1)

别来无恙 提交于 2019-12-12 10:34:36
问题 I need to scale up an iframe to make it bigger (I have no control over the source code of the iframe's content). I'm trying to achieve it via the -webkit-transform: scale(1.3) CSS property. The iframe's content is scaled up correctly, but when I try to touch any of the controls in the iframe, then it seems that the touch event is being received at the wrong location (I can see that the control's "shadow" is highlighted at the wrong place upon touch). Therefore event handlers are not working