iframe

How can i change the size of an iframe from inside?

孤者浪人 提交于 2019-12-20 10:03:02
问题 I'm developing with jquery and I stumbled with the next problem: I added an IFrame inside the main page and I want to re size them from inside. I tried some ideas but without success. Here is my code: index.html <html> <head> <title>Index</title> </head> <body> <iframe id="myframe" src="frame.html" width="100px" height="100px"></frame> </body> </html> frame.html <html> <head> <title>IFrame</title> <script> document.width = 500; document.height = 500; </script> </head> <body> <h2>My IFrame</h2

What exactly can an IFrame do with the top.Location object (cross-domain)?

左心房为你撑大大i 提交于 2019-12-20 09:53:53
问题 There is a very particular edge case in cross-domain policies regarding the window.top.Location object... Let's say I have IFrame A , in domain www.bbb.com, living inside a page in domain www.aaa.com. The page inside the IFrame can: Compare window.top.location to window.location (to detect whether it's being framed) Call window.top.location.replace(window.location) to redirect to self Call window.top.location.replace("any arbitrary string") to redirect somewhere else But it cannot: Alert,

Javascript code in iframes in IE9 not working

蹲街弑〆低调 提交于 2019-12-20 09:34:42
问题 I've a very complete site in ASP.NET wich uses iframes. I'm working to change an old control we'd been using to show dialogs to use jQuery UI dialogs. I'm also making sure everything works well in IE9. The fact is: the script I've in the pages shown in iframes is not working in IE9. Why? Because Object, Array and String are undefined. There may be some others issues, I've seen only this ones. There is no chance (because a lot of reasons) to stop using iframes on some dialogs. And I'd rather

Youtube IFrame API Untrusted Origin

人盡茶涼 提交于 2019-12-20 09:19:29
问题 I'm using the IFrame API as the title suggests. I have been following the guide in the API Reference. It works for me however I have found a few warnings that occur and would like to solve them. They are: Untrusted origin: https://www.youtube.com and Untrusted origin: chrome-extension://boadgeojelhgndaghljhdicfkmllpafd both of which originate from www-embed-player.js:331 Through my research I have found that the second one happens because it constantly polls for the chromecast extension

How to resize iframe when parent window resizes

Deadly 提交于 2019-12-20 09:03:03
问题 I don't think this is not another "resize iframe according to content height" question. I actually want to resize the iframe dynamically according to a resize of the parent window. For JS Fiddle fans I have an example here For those who want to look at the code on SO: <div id="content"> <iframe src="http://www.apple.com" name="frame2" id="frame2" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" allowtransparency="false"> </iframe> </div> <div id="block"></div> <div id="header

Why are iframes so slow?

我们两清 提交于 2019-12-20 08:57:57
问题 I have little bit longer question for you - but hope answer will be very simple :) Let's say I have very simple page with link and iframe (just for simple example). <body> <a href="test.html" target="mframe">open link></a> <iframe name="mframe" [params] /> </body> So when you click on the link it will load test.html in the frame. Now I will change the iframe with div and ajax call. <body> <a href="doAjaxCall('test.html')">open link</a> <div id="main-content"></div> </body> The doAjaxCall will

How can I make an iframe resizable?

不想你离开。 提交于 2019-12-20 08:56:22
问题 We have this group project and I was assigned to make a certain iframe resizable. I've been reading lots of forum posts since last week, and I found out that iframe itself can't be resizable. Is there a way to make my iframe resizable? 回答1: This can be done in pure CSS, like so: iframe { height: 300px; width: 300px; resize: both; overflow: auto; } Set the height and width to the minimum size you want, it only seems to grow, not shrink. Live example: https://jsfiddle.net/xpeLja5t/ This

Firebug and jQuery selectors in an iFrame

北城以北 提交于 2019-12-20 08:50:39
问题 I'm working on a web application and using the jQuery plug-in Colorbox to pop up a window that presents a form for editing elements of the parent window. I'm using Firebug to debug my Javascript and jQuery, and I noticed that I can't select an element in my Colorbox HTML form using the jQuery console command line. For instance: $date = $("#date"); returns nothing when run from the jQuery console command line, even though I have an input element with id="date" and the Firebug "element inspect"

firebug: how to cd to an iframe

纵饮孤独 提交于 2019-12-20 07:58:35
问题 I have a facebook canvas application that runs in an iframe. I would like to debug my page in firebug but can not get the javascript to scope to the iframe that is running my app. the iframe: <iframe frameborder="0" src="[app_url_removed]" name="iframe_canvas" id="iframe_canvas" class="canvas_iframe_util" style="height: 905px;"></iframe> i've tried all the following and none of them work: cd(iframe_canvas) cd(window.iframe_canvas) cd(iframe_canvas.window) cd($('iframe_canvas')) I have firefox

Google Maps does not render correctly in IE8 within iframe nyromodal layer

£可爱£侵袭症+ 提交于 2019-12-20 07:33:44
问题 I try to render a google map within a nyromodal iframe layer. It works fine in Chrome and Firefox, but in IE8 there is a strange issue: On first load, it works fine. Yet after I close the layer and reopen it on the same page, the map will render false: only mostly showing grey tiles and and and all its content will be splattered randomly, e.g. like so: If I clear the cache and reload, the map will work again but only one time. 回答1: The problem most likely lies within the fact that nyromodal