iframe

force target=“_self” on dynamic external cross domain in iframe

天涯浪子 提交于 2019-12-13 20:17:51
问题 I have a site on kiosk mode on chrome using iframe in which I am opening number of external sites. And each of the sites has their own links with target="_blank". I have no control on those external links. I want to open all those external links inside iframe only or I would need to publish some message for those target=_blank links. I can't open new window on kiosk. I have searched so far and found it has to be some server side coding. Javascript won't be any help in that. My iframe code:

Is it possible to tell if the src of an iFrame has changed?

倾然丶 夕夏残阳落幕 提交于 2019-12-13 19:29:18
问题 Is it possible to tell if the source of an iFrame has redirected the client to another page? And if so, tell what page the client got redirected to? 回答1: onload event like <iframe src="http://www.mydomain/" onLoad="alert('fire');"></iframe> The alert will pop-up whenever the location within the iframe has changed. check it out here also Here is a question explaining how to get current location of an iframe 回答2: The src attribute won't change if the iframe navigates to a new page, but the

Auto-resize iframe based on content height

这一生的挚爱 提交于 2019-12-13 19:28:04
问题 I have a site on my server that is pulling in an iframe from an external site in which I do not have access. I want the iframe to resize the height based on the content that is being pulled in so the page as a whole looks like a single page. *I do not need to know how to get rid of the scroll bars. Does anyone have any ideas? Thanks in advance! 回答1: I don't think it's possible. There is no way to interact with an iframe with JavaScript. That would have serious security consequences so

POST a form in an iframe

心不动则不痛 提交于 2019-12-13 19:24:47
问题 I would like to POST a form in an iframe, generated like so: My JS loads an iframe inside the page, adds a form to the iframe and submits the form. What I would like to happen is the iframe to load the result of that request. So, I would effectively like to post a form and render the result inside the iframe , without touching the parent (apart from putting the iframe up for display in the first place). I am using the code from this answer: JavaScript post request like a form submit but I can

How to deal with setting dynamic iframe content dynamically

邮差的信 提交于 2019-12-13 19:20:01
问题 I have a page where I need to dynamically create an iframe and stick it into a div on the page. I create the iframe like this: var frame = $('<iframe>') .attr('id', 'myIframe') .addClass('someClass') .appendTo($('#someDiv')); Depending on some condition, I need to either: A) set the iframe src to some other page OR B) dynamically add some HTML to the iframe. I have option A working fine, but option B is throwing security errors: if (someCondition) { // option A, works fine frame.attr('src',

parent.location.assign(url) not working from fancybox iframe

二次信任 提交于 2019-12-13 18:16:35
问题 I'm trying to reload the browser with a url link clicked in fancybox by the user so the parent window will go to the url after fancybox has closed, but only if the link is clicked and not when fancybox is closed normally. I open an asp file in fancybox that uses google maps api to show an interactive map. I'm testing when a marker is clicked, the infowindow opens with a link, which is a new location. I've gotten fancybox to close and the parent window reloads, but for some reason I cannot get

Track YouTube Video Playback with jQuery and Google Analytics Events

时光怂恿深爱的人放手 提交于 2019-12-13 18:01:35
问题 I have 4 iframe and I want to recover by clicking on their id . I walked my iframe using google analytic and I put their id in a table. Then I create an object of type YT.Player Probleme : the method onPlayerStateChange does not run . here is my code : <script type="text/javascript"> /* YouTube Analytics Code adapted from: http://www.lunametrics.com/blog/2012/10/22/automatically-track-youtube-videos-events-google-analytics/ http://lunametrics.wpengine.netdna-cdn.com/js/lunametrics-youtube.js

Office 365 app inside iframe?

不羁的心 提交于 2019-12-13 17:25:00
问题 OK, guys need some advice with runing ASP.Net app inside iframe. I have a CMS and ASP.Net app which talks to Office 365. Because I couldn't integrate my app into CMS (authentication issue) I am calling my office app using jQuery Window Plugin which has two advantages: I styled the window to look as though its part of the CMS It has onClose event which I was able to use as a trigger that I need to update UI Everything works great. Only issue is when user goes to sign in. Because Office API

Detecting Whether An Iframe Is Angular Or Not With Protractor

ⅰ亾dé卋堺 提交于 2019-12-13 17:17:43
问题 I have the following unusual use case. I detail it below 1) I'm on an angular page & I do some actions on the page [It loads a non-angular iFrame] 2) I switch to the non-angular iframe & interact with some screens. 3) Eventually this causes redirection to happen back to an angular page. When I use protractor for step 2 I have to use it with flag browser.ignoreSynchronization set to false as it is non-angular. I need a way to check whether the form I'm interacting with is angular or not to

Content inside iframe match width of parent div

时光毁灭记忆、已成空白 提交于 2019-12-13 17:14:03
问题 I have a responsive website that changes style sheets depending on browser width. I have a webform embeded through an iframe. The webform it's self is also responsive. Is there anyway to have the webform width reflect the parent div width. 回答1: iframe { position: relative; width: 100% } 来源: https://stackoverflow.com/questions/16890025/content-inside-iframe-match-width-of-parent-div