iframe

JSF Phase Listener redirect form not iframe

拥有回忆 提交于 2019-12-23 19:15:30
问题 I have this PhaseListener that checks whether the user is still logged in or not after restoring a view. If the session has expired, then I want the entire form to redirect to the /login.jsf page but instead it only redirects the iframe within. Basically, this is my code in the afterPhase() method: if (isWebUserLogonOk(session)) { NavigationHandler nh = faces.getApplication.getNavigationHandler(); nh.handleNavigation(faces, null, "loggedoff"); } Where loggedoff is a navigation case that takes

Open iframe PDF links in new tab (Chrome)

只愿长相守 提交于 2019-12-23 19:07:14
问题 I have a PDF in an iframe, for example: <iframe src="https://www.irs.gov/pub/irs-pdf/f1040.pdf"></iframe> In Chrome (at least), clicking the link in the bottom left corner of the PDF causes the parent (containing) frame to navigate to http://www.irs.gov/form1040. Is there way to make this link to open in a new tab instead? 来源: https://stackoverflow.com/questions/35687982/open-iframe-pdf-links-in-new-tab-chrome

Is jQuery.ready() valid when used on iframe.contentDocument?

[亡魂溺海] 提交于 2019-12-23 18:50:32
问题 Simple question (as stated in the title): Is jQuery.ready() valid when used on iframe.contentDocument ? And the complex question: I have to hook a keyup event on an input field in a CMS, hence I have no control over the HTML, only the script. The input is inside an iframe that's nested in another iframe, so there's a top window (the browser window), an iframe (lets call it iframe1) and another iframe inside of that (lets call that one iframe2). The script and jQuery are located in the <head>

Issue communication with postMessage from parent to child iFrame

a 夏天 提交于 2019-12-23 17:59:10
问题 I'm having an issue communicating from my parent window to the child iFrame. But in the other side, everything works perfectly. Here is how I get the chil iFrame object in order to fire the postMessage function: var iFrame = document.getElementById('Frame').contentWindow; When I print it int he console, I get the following: Window {parent: Window, opener: null, top: Window, length: 0, frames: Window…} When I proceed to the postMessage function as follows: iFrame.postMessage("message", "http:/

How to request different domain with Ajax in jQuery

拈花ヽ惹草 提交于 2019-12-23 17:47:44
问题 I need to make a request to a different domain with Ajax in jQuery! Should I use iframe ? Edited: On facebook.com working chat, with few different domain name? GET http:// www.facebook.com/ajax/presence/reconnect.php?__a=1&reason=6&iframe_loaded=false&post_form_id=23be2df75b74a0bcb61358814c56ba4f 200 OK GET http://0.50.channel.facebook.com/x/2562941315/4271808869/true/p_1529934952=2 200 OK I want something like... 回答1: You can not because of same origin policy. You have a few options. JSONP

How to mute an iframe content?

柔情痞子 提交于 2019-12-23 17:26:44
问题 I have a 3rd party iframe containing videos from youtube, vimeo ,... Is there a generic way to mute the iframe content independently from the video/audio source ? 回答1: Step 1. First you need to access the iframe. var iframe = document.getElementById('iframeId'); var innerDoc = iframe.contentDocument || iframe.contentWindow.document; Step2. Once you get the inner document reference, you can access its inside DOM elements. Suppose your video/audio element id is mediaElem then. var MediaSource =

How force iFrame open all links stay in the iFrame?

大城市里の小女人 提交于 2019-12-23 17:26:10
问题 I'm hosting an iFrame and it seems like when a link points to external domains it loads it on the main window and not in the iFrame. Is there a way to force the links to be opened in the same iFrame? Notice: I can add anything I want to the page loaded in the iFrame (using Chrome extension). I tried adding: <base target="_parent" /> But it didn't do any good... 回答1: Check Headers of your external domain page. If X-Frame-Options Header is set to DENY , browser ignores loading content to iframe

javascript - get data from an element within an iframe

≯℡__Kan透↙ 提交于 2019-12-23 17:18:15
问题 I've got this <iFrame> [name="data"] with a page displaying a <span> , with id="weergave_percentage". I want to get the numbers from that span into a javascript function. I currently made this, but it returns: null var percentage = window.frames['data'].document.getElementById('weergave_percentage'); alert(percentage); What am I doing wrong and how can I do what I want? Note: the span containing the data, only contains numbers (float), and no other HTML formatting of any kind. Also, I've put

Chrome scrolls on tab key when form in iframe has focus

两盒软妹~` 提交于 2019-12-23 17:04:01
问题 I have a iFrame which hosts an external site containing a form. If I press the tab keys on some of the form's textboxes, the whole browser tab scrolls down a page. Strangely enough, this doesn't do it on all of the form fields. This only seems to happen in Chrome. I've tried it in Firefox and IE11, and this doesn't happen. After it has scrolled down, the next form field does have focus - so the issues isn't that the next field is really far down. The same happens when Javascript is disabled.

Working example of paypal Website Payments Pro Hosted Solution Iframe?

感情迁移 提交于 2019-12-23 16:56:14
问题 I am looking to use use paypals Website Payments Pro Hosted Solution so we can accept payments through paypal without our users feeling like they are leaving the site and without us having to be PCI compliant. We are wanting this to work in this format: user hits buy page for an item and selects quantity and hits buy now button AJAX request is sent to server to validate quantity/calculate total etc AJAX request returns url for iframe Iframe is populated with the page, then once it has