iframe

How to make IFRAME listen to scroll events as parent when click event within parent iframe is triggered

半世苍凉 提交于 2019-12-18 04:19:31
问题 I have two iframes in an html page <table border="1" width="100%" height="100%"> <tr> <th><iframe id="i1" width="100%" height="100%" src="/wordpress"></iframe></th> <th><iframe id="i2" width="100%" height="100%" src="/wordpress"></iframe></th> </tr> </table> I am giving click event to "a" tag to change the href so that when any link within that iframe is clicked and src of iframe with id "i1" changes the src of second iframe also change subsequently and both iframe have the same page view. $(

How can I make an html page automatically fit mobile device screens?

混江龙づ霸主 提交于 2019-12-18 04:12:44
问题 I am putting a Formidable Form on an html page by using an <iframe> , but I'd like it to be full screen on a mobile device. So far I'm using the following code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style> @import url(http://fonts.googleapis.com/css?family=Londrina+Sketch); body { background-color: #f3eedd; width: 750px; overflow:scroll; overflow-x:hidden; } h2 { font-size: 20px; color: #c13e18; margin: 10px 30px 10px 30px; } <

instanceof HTMLElement in IFRAME is not Element or Object?

喜夏-厌秋 提交于 2019-12-18 04:08:17
问题 Trying determinate DOM Element by simple check isElement = SomeThing instanceof Element works in main document, but not on (all?) nodes in iframe. Example output (Google Chrome): (mdiv is DIV in main document, idiv is DIV in iframe) OMGWTF ok: mdiv instanceof Element ... true ... [object HTMLDivElement] ok: mdiv instanceof Object ... true ... [object HTMLDivElement] ko: idiv instanceof Element ... false ... [object HTMLDivElement] KO : idiv instanceof Object ... false ... [object

Attach click handler even on element inside iframe with jQuery

可紊 提交于 2019-12-18 03:59:14
问题 How can I attach a click event handler to an element inside an iframe? Here's what I tried and doesn't work: $("#parent iframe").contents().find("a").live("click", function () { alert ("test"); return false; }); The iframe is on the same domain. 回答1: Discovered the problem. LIVE does not work inside an iframe. Switching to bind works fine. Will do manual event delegation instead. 回答2: Basically probably not as at a guess the content is likely to be from a different domain (usual use of

Why can a child redirect a parent frame?

ぐ巨炮叔叔 提交于 2019-12-18 03:58:12
问题 I have a look at these two questions and i don't understand. Redirect parent window from an iframe action How to prevent IFRAME from redirecting top-level window On one hand it appears that you can redirect the parent iframe and on the other you cannot? When i try it, I have no problem redirecting the parent frame so i'm curious as in why everyone say you cannot redirect parent frame unless you are on the same domain. But I can redirect without having the frame on the same domain. As stated

Why can a child redirect a parent frame?

谁说我不能喝 提交于 2019-12-18 03:58:12
问题 I have a look at these two questions and i don't understand. Redirect parent window from an iframe action How to prevent IFRAME from redirecting top-level window On one hand it appears that you can redirect the parent iframe and on the other you cannot? When i try it, I have no problem redirecting the parent frame so i'm curious as in why everyone say you cannot redirect parent frame unless you are on the same domain. But I can redirect without having the frame on the same domain. As stated

div on top of iframe

China☆狼群 提交于 2019-12-18 03:57:19
问题 Im looking for a solution to place a div (100% screen width and lets say 20% height) on top of iframe which is 100% screen width and 100% screen height It should look like this: __________________________ || On top DIV || ||_______________________|| | | | Iframe | | | |_________________________| 回答1: Super simple stuff.. put an iframe, and a header div inside one container div. set position:relative on the container, and position:absolute and top:0 on the header div. that should do it. HTML:

Spring Security Sessions without cookies

徘徊边缘 提交于 2019-12-18 03:50:17
问题 I'm trying to manage sessions in Spring Security without leveraging cookies. The reasoning is - our application is displayed within an iframe from another domain, we need to manage sessions in our application, and Safari restricts cross-domain cookie creation. (context : domainA.com displays domainB.com in an iframe. domainB.com is setting a JSESSIONID cookie to leverage on domainB.com, but since the user's browser is showing domainA.com - Safari restricts domainB.com from creating the cookie

cross site iframe postMessage from child to parent

与世无争的帅哥 提交于 2019-12-18 03:35:49
问题 I found this samplefrom SO while browsing for my problem, but I want to know exactly how to use it in my scenario. I have an iframe which is from another domain, and I want to detect when the iframe url is changed from one to another page in that other domain. So, what I was thinking is to have something like this when the 2nd page in the iframe is opened: <script type="text/javascript"> $(document).ready(function() { parent.postMessage("Second Page"); } </script> That's all I need, I just

Youtube iFrame API setPlaybackQuality ignored on mobile device

允我心安 提交于 2019-12-18 03:22:09
问题 I'm trying to setup YouTube iframe API to play a FullHD video with a lower quality. My goal is to save bandwidth on mobile devices and reduce loading time. My HTML structure is the classical player div, plus a debug div for messages. HTML <div id="debug"></div> <div id="your_video_id"> <div id="player"></div> </div> I've tried to invoke setPlaybackQuality as soon as the player is ready, to avoid mobile users wasting time in buffering (as suggested in this post). I've also invoked it in both