iframe

Read IFrame cookie

旧巷老猫 提交于 2019-12-12 14:19:19
问题 I created an iframe and I loaded a website in it ( i dont have access to this website - it wasnt written by me) <script type="text/javascript"> var el = document.createElement("iframe"); el.setAttribute('id', 'ifrm'); document.body.appendChild(el); el.setAttribute('src', 'http://AWEBSITE.com/'); alert(document.getElement("iframe").cookie); //This doesnt work..... </script> Can I use javascript in some way to read my cookies of the iframe? 回答1: It is impossible because of the same origin

intersection observer polyfill not working Safari

和自甴很熟 提交于 2019-12-12 14:12:13
问题 I need to detect if my iframe which is loaded from another domain is in viewport. This works fine native in Chromem,Firefox and IE called Intersection Observer. However this is not working in Safari. There has been created a polyfill for this: Github link and should be working on Safari as well. I tested it using this code: Site A: <html> <head> </head> <body> A lot of text here so the iframe is not inview. A lot of text here so the iframe is not inview. <br> <br> . . . . . . . <br> A lot of

Holy grail for determining whether or not local iframe has loaded

回眸只為那壹抹淺笑 提交于 2019-12-12 13:43:27
问题 Firstly, I see this question asked a few times but no answers seem satisfactory. What I am looking for is to be able to call a script at anytime and determine whether or not an iframe has loaded - and to not limit the script to require being added to the iframe tag itself in an onload property. Here's some background: I have been working on an unobtrusive script to try and determine whether or not local iframes in the dom have loaded, this is because one of our clients includes forms on their

How to make a frame in WordPress?

China☆狼群 提交于 2019-12-12 13:25:59
问题 This question was migrated from Webmasters Stack Exchange because it can be answered on Stack Overflow. Migrated 7 years ago . I need to make an update to my website, and my webmaster has gone AWOL. I'm totally unfamiliar with WordPress, and as technically proficient as I like to think of myself, I cannot find how to make a frame on a page that refers to another URL. There are several other pages on my site that have similar frames, but the code for those pages appears to be totally empty.

iframe.contentWindow 属性:关于contentWindow和contentDocument区分

此生再无相见时 提交于 2019-12-12 12:54:53
定义和用法     contentDocument 属性能够以 HTML 对象来返回 iframe 中的文档, 可以通过所有标准的 DOM 方法来处理被返回的对象 。   语法:frameObject.contentWindow,或者 iframeObject.contentWindow(不是jquery对象)   用iframe嵌套页面时,如果父页面要获取子页面里面的内容,可以使用contentWindow或者contentDocument,其区别如下:   1、contentWindow 这是个只读属性,返回指定的iframe的窗口对象。它虽然不是标准的一部分,但各个主流浏览器都支持。   2、contentDocument Firefox 支持,IE6,IE7都不支持,IE8开始支持,需要如此访问 document.frames['J_mainframe'].document。   兼容获取document对象: var getIFrameDoc = function(){ var iobj = document.createElement("iframe"); document.getElementsByTagName("body")[0].appendChild(iobj); return iobj.contentDocument || iobj

HTML frame tag URL of browser not changing

旧时模样 提交于 2019-12-12 12:32:23
问题 How do I change the URL of the browser with a website using a structure of <frame> . I know the whole point of <frame> is to use embedded frames so that you can't tell where the site is going. In particular, when you click a link, the frame changes, but the URL at the top of the browser says the same thing. I'm trying to make it so that the browser CHANGES the URL, so the real URL of the main inner frame is shown at all times. How can I do this? 回答1: You can't; best bet is to change the

Why won't <iframe> elements validate in HTML 4.01?

丶灬走出姿态 提交于 2019-12-12 12:28:48
问题 I was just checking to see if it was valid to put an <iframe> element inside a <noscript> element as a fall back for displaying dynamic content. It validated fine with the HTML 5 doctype, but for HTML 4.01, I get the following error: Line 9, Column 35: element "IFRAME" undefined <iframe name="test" src="test.htm"></iframe> You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:

White space at the bottom of WebView in Android

北战南征 提交于 2019-12-12 12:27:41
问题 I'm developing an Android application and I'm loading one google maps iframe in a WebView, just like this one: http://maps.google.es/maps/empw?url=http:%2F%2Fmaps.google.es%2Fmaps%3Ff%3Dq%26source%3Ds_q%26hl%3Des%26geocode%3D%26q%3Dmadrid%26aq%3D%26sll%3D40.396764,-3.713379%26sspn%3D11.856886,23.269043%26vpsrc%3D0%26ie%3DUTF8%26hq%3D%26hnear%3DMadrid,%2BComunidad%2Bde%2BMadrid%26t%3Dm%26z%3D10%26ll%3D40.416691,-3.700345%26output%3Dembed&hl=es&gl=es It is showing correctly in Android emulator,

Programmatically click link in iframe with Javascript

点点圈 提交于 2019-12-12 12:26:12
问题 Here's my html/javascript. Below there are two if statements that I've tried. I used indexof to get the text between the <a></a> tags. Also tried href == to use the href= contents. Both do not work. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>pb</title> <script type="text/javascript"> function call() { alert("Called!"); var allAnc = document.getElementById("d").contentDocument.getElementsByTagName("a"); for (var i = 0; i < allAnc.length; i++) { if (allAnc[i].href.indexOf("Flag")

Youtube API https Protocol

。_饼干妹妹 提交于 2019-12-12 12:25:59
问题 When I create an iframe player API using the onYouTubeIframeAPIReady , the link is created with the http protocol Example: // 2. This code loads the IFrame Player API code asynchronously. var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an <iframe> (and YouTube player) // after the API code