iframe

Detect iframe request in a rails app

我是研究僧i 提交于 2019-12-23 09:48:39
问题 I have a iFrame tool, which should get rendered in a other format than my page. So I want to detect requests from iFrame like I can detect them from a iPhone. Is this possible? Is there a special hint in the request header, that I could use, or could I manually enter one? Thanks Markus 回答1: When you get a request from an iPhone there will be send a "User Agent"-String like Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419

How to get height of iframe cross domain

帅比萌擦擦* 提交于 2019-12-23 09:36:39
问题 I have iframe(cross domain) with src from facebook, twitter or etc. I need to get height of iframe but i got issue: "Permission denied to access property 'document'". Please help me to resolve this. Many thanks! 回答1: Couple issues. First, the height of the iframe is likely not what you want. I mean that's set explicitly in the HTML code of the page you control and is readily accessible and modifiable through any Javascript means. What it appears you are after is the height of the page inside

Printing just an iFrame

流过昼夜 提交于 2019-12-23 09:10:04
问题 I'm working on a case resolution system, and am currently using a jquery colorbox to display a list of open tasks to the user. Users want to be able to print this list, and I guess you can do it from within the page itself by adding a JavaScript link that triggers window.print from within the iframe. However, I've also got to account for users possibly selecting print from the browser's menu. In that case, if the colorbox is open, I just want to print its contents and not the overlying page.

Displaying image in Iframe

ぐ巨炮叔叔 提交于 2019-12-23 08:58:40
问题 I want to display an image within an iframe on my webpage. However, the problem is that I can't get it to expand to 100% of its size. What I want to do is the following. Have an iframe on my webpage. Call an image within the iframe. Make the image expand to full-size and as a reaction, the iframe allows me to scroll. Not have any scroll bars on my webpage Currently, here's the code I have: echo"<iframe name='graph' id='graph' src=$image style='position:absolute; top:0px; left:0px; height:100%

Google Chrome won't allow IFRAME to load an HTML file

南楼画角 提交于 2019-12-23 08:58:35
问题 I've got this iframe that is working fine on FF, but it doesn't seem to load up on Google Chrome. Could someone tell me why this is happening? My iframe : <iframe src="http://tripsketch.com/page?s=TheCavendish#!Id=1024&Name=London&Type=City&view=Attraction" height="700" width="990" frameborder="0" scrolling="no"> </iframe> 回答1: I tested it and it works OK in chrome on my end. My guess is that you have it set up so the page containing the iframe is being accessed via https. If the page is

Chrome iFrame Block HTTPS redirect

 ̄綄美尐妖づ 提交于 2019-12-23 08:57:04
问题 I've got a parent site : https://a.company.com , which contains an iframe with https content ( https://b.company.com/foo ) and everything is happy so far. But, when a redirect occurs to load a different route on that same domain, chrome blocks it as a mixed content error. Viewing the request in the network traffic confirms that the browser is requesting https , yet chrome still cancels the request citing that I can't load mixed ( http ) content. All searching has got me so far is to people

How to data-bind content for an iframe using KnockoutJS?

走远了吗. 提交于 2019-12-23 08:29:37
问题 Can anyone please tell me how to bind data to an iframe using Knockout? I have tried to do this as below, but it is not working as expected: <iframe data-bind ="attr: { src: testcontent}"></iframe> And Javascript: var ViewModel = function (content) { this.testcontent = ko.observable(content); }; ko.applyBindings(new ViewModel("Hello World!!")); I want to add the text "Hello Content" into the iframe . Can anyone please help me on this? 回答1: Warning: this obviously has security implications!

How do I make an iframe 100% height of a containing div in Firefox?

我们两清 提交于 2019-12-23 07:56:11
问题 I'm having some trouble figuring out how to extend an iframe to 100% of it's container element in Firefox and IE (it works fine in Chrome). From searching around, it makes sense that there has to be a height specified on the containing div (and possibly body and html as well). However, I have done that, and the iframe is still not extending. Do all of the parent divs have to have a specified height and position for this to work, or just the containing parent? Any fix for this would be greatly

Using a javascript function to load a page in an iFrame

浪尽此生 提交于 2019-12-23 07:47:03
问题 I'm trying to use a Javascript function to load a web page in an iframe named "cake". How can I do that? <html> <head> </head> <body> <button onclick=[function]>Load page in iframe</a> </body> </html> 回答1: function changeUrl() { var site = "http://www.w3schools.com"; document.getElementsByName('iFrameName')[0].src = site; } <html> <head> </head> <body> <button onclick="changeUrl()">Load page in iframe</button> <iframe name="iFrameName"></iframe> </body> </html> 回答2: This worked: <html> <head>

set focus to iframe body/content in firefox?

☆樱花仙子☆ 提交于 2019-12-23 07:46:16
问题 i have an ifram, which has hidden visibility. i click on button - iframe will be visible and i want to focus on its body/content. because now i must click on button and then into iframe, so thats two clicks. i want to do it on one click, but dont know how to focus in firefox. in explorer it is ok: var iframe_window = window.frames["myFrame"]; iframe_window.document.body.focus(); try lot of examples for firefox, but they dont work. anybody know how to do it in firefox ? thanks. 回答1: Try to set