iframe

Insecure content in iframe on secure page

感情迁移 提交于 2019-12-17 15:33:00
问题 I'm in the in the process of developing an application for a client, which will have an SSL certificate and be served under https. However, to integrate with their existing site they want to provide their navigation inside an iframe. I can see this causing trouble, as I'd expect the browser to complain about the mix of secure and insecure content on the page. I've had a look at similar questions on here and they all seem to refer to this the other way round (secure content in the iframe).

Chrome userscript error: “Unsafe JavaScript attempt to access frame”

你。 提交于 2019-12-17 13:23:48
问题 // the iframe of the div I need to access var iframe = document.getElementsByTagName("iframe")[2]; var innerDoc = iframe.contentDocument || iframe.contentWindow.document; // resize 'player' in the iframe innerDoc.getElementById('player').width = "1000px"; innerDoc.getElementById('player').height = "650px"; Running in a userscript for this url: http://www.free-tv-video-online.me/player/sockshare.php?id=24DA6EAA2561FD60 Why does Chrome come out with this error and fail the script?: Unsafe

Chrome userscript error: “Unsafe JavaScript attempt to access frame”

假如想象 提交于 2019-12-17 13:23:32
问题 // the iframe of the div I need to access var iframe = document.getElementsByTagName("iframe")[2]; var innerDoc = iframe.contentDocument || iframe.contentWindow.document; // resize 'player' in the iframe innerDoc.getElementById('player').width = "1000px"; innerDoc.getElementById('player').height = "650px"; Running in a userscript for this url: http://www.free-tv-video-online.me/player/sockshare.php?id=24DA6EAA2561FD60 Why does Chrome come out with this error and fail the script?: Unsafe

Show div from another website

Deadly 提交于 2019-12-17 12:37:32
问题 Is there a way to use an iframe or some other method of showing a named div from another website? I want to pull in some data from a government website into a google map and when they click the point I want the information from one of the divs on that page to display. 回答1: I take assumption that you are sure of div's ID in that other website. If yes. use Jquery Ajax to pull the site's content into a hidden iframe in your site. then fetch the content of the div-in-question into some variable

Weird behaviour of iframe `name` attribute set by jQuery in IE

▼魔方 西西 提交于 2019-12-17 12:22:27
问题 I'm doing an ajax style file upload by posting the file in a form to an iframe and noticed some weird behaviour in IE (seems to happen in both 6 & 8). Basically in IE the form doesn't target the iframe properly so the response appears in a new window (instead of in the iframe). You can reproduce the problem with the following minimal set of HTML/JS: <html> <head> <script src="http://code.jquery.com/jquery-1.3.2.js"></script> <script> $(document).ready(function(){ var frameName = "myFrame";

Weird behaviour of iframe `name` attribute set by jQuery in IE

拥有回忆 提交于 2019-12-17 12:21:01
问题 I'm doing an ajax style file upload by posting the file in a form to an iframe and noticed some weird behaviour in IE (seems to happen in both 6 & 8). Basically in IE the form doesn't target the iframe properly so the response appears in a new window (instead of in the iframe). You can reproduce the problem with the following minimal set of HTML/JS: <html> <head> <script src="http://code.jquery.com/jquery-1.3.2.js"></script> <script> $(document).ready(function(){ var frameName = "myFrame";

is it possible that iframe resize itself without help from main window?

三世轮回 提交于 2019-12-17 12:06:50
问题 Both main window and iframe are on the same domain, but what I want to achieve is to resize iframe to fit its contents using js only within that iframe. I also do not know the id of the iframe that is assigned to it by main window. And I do not want to use jquery or any other framework for it. 回答1: You can do this also without knowing the id of the iframe in the parent window: window.frameElement.style.width = iframeContentWidth + 'px'; window.frameElement.style.height = iframeContentHeight +

is it possible that iframe resize itself without help from main window?

跟風遠走 提交于 2019-12-17 12:06:07
问题 Both main window and iframe are on the same domain, but what I want to achieve is to resize iframe to fit its contents using js only within that iframe. I also do not know the id of the iframe that is assigned to it by main window. And I do not want to use jquery or any other framework for it. 回答1: You can do this also without knowing the id of the iframe in the parent window: window.frameElement.style.width = iframeContentWidth + 'px'; window.frameElement.style.height = iframeContentHeight +

is it possible that iframe resize itself without help from main window?

夙愿已清 提交于 2019-12-17 12:06:06
问题 Both main window and iframe are on the same domain, but what I want to achieve is to resize iframe to fit its contents using js only within that iframe. I also do not know the id of the iframe that is assigned to it by main window. And I do not want to use jquery or any other framework for it. 回答1: You can do this also without knowing the id of the iframe in the parent window: window.frameElement.style.width = iframeContentWidth + 'px'; window.frameElement.style.height = iframeContentHeight +

Communication between iFrames? [duplicate]

给你一囗甜甜゛ 提交于 2019-12-17 11:45:09
问题 This question already has answers here : How to communicate between iframe and the parent site? (5 answers) Closed 5 years ago . How can you make two iFrames talk to each other? For example I was a element value off the 2nd iframe and the 1st iframe has the display element on it. I need to get the value off the 2nd frame to the 1st. How would I do this? Don't say use cookies, cause that will hurt with massive sum of data. 回答1: If the <iframe> elements are served from the same domain, then