iframe

Prevent parent page from scrolling when mouse is over embedded iframe

放肆的年华 提交于 2019-12-12 16:27:32
问题 ...without limiting the scroll inside the iframe or the need to specifically name the scrollable elements. I have a google-map-like widget that can be embedded in 3rd party websites in the form of an iframe embed code. When people use mouse wheel over my widget I want only the content of the widget to scroll and not the parent page. My question is similar to How to prevent page scrolling when scrolling a DIV element? but my problem is that my ifrmae contains multiple elements including media

Iframe source with variable

老子叫甜甜 提交于 2019-12-12 16:09:50
问题 I have a couple of questions: Is <iframe src="/index.php"></iframe> the same as HTMLIFrameElement ? Why <iframe src="data:text/html;base64,aHR0cDovL2V4YW1wbGUuY29t" height=1280 width=800></iframe> works fine, but a=document.getElementsByTagName('body')[0]; b=document.createElement('iframe'); b.src="data:text/html;base64,aHR0cDovL2V4YW1wbGUuY29t"; a.appendChild(b); does not work? I mean in DOM HTMLIFrameElement src I could put function with encoded string. Is it possible to encode string only

IFrame in content script. How to communicate with main.js?

纵然是瞬间 提交于 2019-12-12 16:01:59
问题 My Firefox add-on opens Fancybox (type: "iframe") from a content script (page-mod). In the Fancybox I show my own HTML page ( my_fancybox_stuff.html ) that is located in my own server. Now, from the my_fancybox_stuff.js (javascript of my_fancybox_stuff.html ), can I send a message to the add-on's main.js ? Or to the content script that opened the Fancybox? I was hoping the global 'self' object to be accessible from my_fancybox_stuff.js as it is accessible from the content script that opened

How to make a screenshot of an embedded iframe

三世轮回 提交于 2019-12-12 15:55:06
问题 I want to have a function that make a snapshot of the iframe and append to the other area of the webpage. The codes should look like: Html: <iframe src="http://edition.cnn.com/video"></iframe> <button id="btn_screenShot" name="screenShot">Grab a image</button> <div id="screenShot-result"></div> JS: function screenShot(iframe) { //what can I do here? //transform the page in <iframe> to a image type, jpeg,png or any other! } $('#btn_screenShot').click(function(){ var imgPath = screenShot

Is there any way to make the background of a 3D-model transparent in a-scene in ionic?

亡梦爱人 提交于 2019-12-12 15:36:49
问题 My problem is to how make the white background of a-frame transparent that we just can see whatever we see from the iPhone camera plus the 3D-model. I have been trying to make AR (Augmented Reality) working in Ionic iOS version. I realised that a-frame can not trigger webcam for some reasons in iOS. So one of the workaround came to my mind is to load 3D model by a-frame and and trigger the camera at the same time. This some how works, in 2/3 of the screen we can see the camera input and 1/3

Putting mobile Google into an iframe does not work

瘦欲@ 提交于 2019-12-12 15:33:38
问题 Behind the following link is the mobile view of Google: Google's mobile site. I tried to put it in an iframe on my website, but it doesn't work. <iframe id="google_search" src="http://m.google.at/search?hl=de&safe=on&q=stackoverflow" style="width: 400px; height: 600px; overflow:scroll; border: 1px solid black;"></iframe> All I get is an emty iframe. Why? 回答1: I would suspect that Google is sending the X-FRAME-OPTIONS header set to deny . This prevents the page from loading in a frame in IE8+

parent.document.getElementById(“…”) is null or not an object in IE7

空扰寡人 提交于 2019-12-12 15:28:53
问题 I have done some research, but as a JavaScript novice, I can't seem to get anything to work for my specific case: I have an iframe in a page, and in that iframe's document, I have the following code: function fun(){ var slideTitle = api.getField('title'); parent.document.getElementById("slidecaptionOoH").innerHTML = slideTitle; In the parent document I have: <h4 id="slidecaptionOoH"></h4> I've tried putting a comment in between the tags, but I still get the error in IE7. The page displays

How to switch to dynamically named iframe with Behat/Mink

ε祈祈猫儿з 提交于 2019-12-12 15:06:19
问题 Writing test for an iFrame generated when a button is clicked. The iFrame name and id are similar but generated dynamically. I have used "switchToiFrame" successfully before. <div class="bbbb-frame-container" style="height: 400px; width: 665px; margin-top: -200px; margin-left: -332.5px;"> <div class="user-support-frame-close-container" style="display: block;"> <div class="user-support-frame-close">Close</div> </div> <iframe id="poplock_default9636_priv" frameborder="0" name="poplock

Click/Tap event not triggering in iframe on iOS devices

牧云@^-^@ 提交于 2019-12-12 15:04:41
问题 I have an instance of an iframe that contains an element with a click handler. The iframe contains a video with a play button graphic overlaid with a click event attached to it. The click event triggers the video to play, hides itself and console.logs a message to say it's been triggered. This functions perfectly on desktop browsers, and when i navigate directly to the iframe url on an iOS device. However, when the iframe is embedded the play button's click/tap event is not fired. Here are

Problem passing parameters via Iframe in IE

£可爱£侵袭症+ 提交于 2019-12-12 14:25:12
问题 I'm trying to execute an HTTP GET from my website to another website that is brought in via iframe. On Firefox, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it works. On IE, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it doesn't work... Is there something about IE that doesn't let you pass parameters through an iframe in the querystring? I've tried refreshing the