iframe

How to get IFRAME to listen to same events as parent (and fire the same handlers)

[亡魂溺海] 提交于 2019-12-29 09:37:11
问题 I've got an HTML page (the parent) with an embedded IFRAME. The parent page has a couple of event listeners for mouse and keyboard events, as shown below (I'm using the Prototype library). var IdleMonitor = Class.create({ active: null, initialize: function(ii) { Element.observe(window, "mousemove", this.sendActiveSignal.bind(this)); }, sendActiveSignal: function() { console.log("MOUSE"); } }); var idleMonitor = new IdleMonitor(); The IFRAME, being a separate document and all, doesn't respond

Apply onClick to Iframe

删除回忆录丶 提交于 2019-12-29 08:53:26
问题 Is there any way to "encapsulate" an Iframe with some other element to simulate onClick? I know the Iframe doesn't support events but I need to track clicks from my website that are leaving thru the Iframe. Thanks! 回答1: If the frame contains page from the same domain (does not violate same-origin policy), you can interact directly with its document: <script type="text/javascript"> window.onload = function() { var oFrame = document.getElementById("myframe"); oFrame.contentWindow.document

IFrame not working in Safari

自古美人都是妖i 提交于 2019-12-29 08:49:10
问题 I have an iframe in my web page. It works fine in FF and Chrome but not in Safari (I'm using Safari 6.0) This is my code: <html> <head> <title>Pengower</title> </head> <body> <div id="container"> <iframe name="news" id="news" src="http://www.penapplications.net/ImogenApps/?Pengower:CRM:Pengower_News"> </iframe> </div><!--end container div--> </body> </html> Funny thing is that, if I access the src url and then access the iframe page, then the iframe shows the content properly, but if I just

Need to open links in new tab in ie8 !

↘锁芯ラ 提交于 2019-12-29 08:31:51
问题 I have a sidebar (right sided iframe) and when i click on a link in it, it opens a new window in IE8, (in firefox it open a new tab). What do i need to do to open links in IE8 in a new tab. I already set the Tools->Internet Options->Settings-> 'Always open pop-ups in a new tab' and 'A new tab in the current window' open in new tab but still doesn't work. My links are pretty simple, what am i missing ? exemple: text. Also some site are saying to register Regsvr32 actxprxy.dll to fix this

YouTube iframe API - onReady and onStateChanged events not firing in IE9

随声附和 提交于 2019-12-29 08:04:11
问题 I have been troubleshooting and searching for an answer to this for hours, to no avail. Sample code from the API documentation is being used verbatim. Sample code that others post and say works on IE9 doesn't for me. I've already confirmed the doctype is properly set in the html, I'm NOT hiding the iframe using display=none in the CSS, and the browser mode is IE9 and document mode is IE9 standards. My security settings are configured to medium high. Even google's sample page does not work for

:hover issue when mouse moves over an iframe which is inside the div | Internet Explorer

六月ゝ 毕业季﹏ 提交于 2019-12-29 08:03:09
问题 Here is my problem: I have made a small bar in the left side of the browserwindow #blokje{left:-180px; position:absolute;...} , when users hover over the bar --> the position changes using #blokje:hover{left:0}; All this works fine, but now I've added a google adsense frame inside the div and... everything works fine except in IE (most used browser; ads...) It looks like the div:hover disappears over the frame causing annoying flickering and users are unable to click ads ! I think that a

Expand An Iframe During jQuery Animation When Contents Expand

余生长醉 提交于 2019-12-29 07:59:06
问题 I'm working on a user dashboard project where a user can interact with widgets (very similar to iGoogle dashboard). I'm using jQueryUI portlets to hold iframes. The problem I'm running into is that I would like to resize the iframe in real-time when the contents inside the iframe expand using jQuery animation. For example, I have a custom accordion control inside an iframe. When the user clicks on a panel to expand the accordion, I call the slideDown() function to show the content. When the

Print a PDF via an iframe in Chrome/Firefox/IE

醉酒当歌 提交于 2019-12-29 07:54:07
问题 I want to trigger the print of a PDF file which I load in and iframe. After looking around, I came up with the following bit <iframe name="pdfname" id="pdfid"></iframe> <button id="printbtn">Print</button> <script language="javascript" type="text/javascript"> $(document).ready(function () { $("#pdfid").load(function() { window.frames["pdfname"].focus(); window.frames["pdfname"].print(); }); $("#printbtn").click(function () { $("#pdfid").attr("src", '@Url.Action("PdfTest", "Home")'); }); }); <

How to scroll an iframe to the bottom when page loads?

女生的网名这么多〃 提交于 2019-12-29 07:44:32
问题 I was like on every question about this on the net, tried like 50 diff methods, first i tried to scroll the div - then when its not worked i've tried to iframe the file with the div and scroll the iframe.. nothing just works! Look on the last script i have set up: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { var t = 100; //arbitrary time in ms $("#frame").animate({ scrollTop: $("#frame").height

Detect if JavaScript is Executing In a Sandboxed Iframe?

二次信任 提交于 2019-12-29 07:29:05
问题 I have a product that's playing a video in Flash (if available), and falls back to HTML5 if Flash isn't available. I'm not able to find a way to determine if JavaScript is executing within an Iframe with the "sandbox" attribute, which is necessary for my solution because sandboxed iframes disable all plugins. The sandboxed iframe could be as simple as this: <iframe src="http://www.cross-domain.com/" sandbox="allow-scripts"> To determine if Flash is enabled, I'm using swfobject's method of