iframe

embed iframe inside shiny app

ε祈祈猫儿з 提交于 2019-12-27 11:43:29
问题 this is my UI. R shinyUI(fluidPage(titlePanel("Getting Iframe"), sidebarLayout( sidebarPanel( fluidRow( column(6, selectInput("Member", label=h5("Choose a option"), choices=c('BCRA1','FITM2')) ))), mainPanel(fluidRow( column(3, htmlOutput("frame")) ) ) ))) This is my server.R library(shiny) members <- data.frame(name=c("Name 1", "Name 2"), nr=c('BCRA1','FITM2')) shinyServer(function(input, output) { loadframe <- reactive({ validate( need(input$Member, "Member input is null!!") ) query <-

cross-domain iframe resizer?

我只是一个虾纸丫 提交于 2019-12-27 11:43:10
问题 I'm looking for a good cross-domain iframe resizing script that adjusts its height based on its content. I have access to the html/css for the source of the iframe as well. Is there any out there? 回答1: If your users are on modern browsers, you can solve this quite easily with postMessage in HTML5. Here's a quick solution which works well: The iframe page: <!DOCTYPE html> <head> </head> <body onload="parent.postMessage(document.body.scrollHeight, 'http://target.domain.com');"> <h3>Got post?<

Iframe scrolling iOS 8

不想你离开。 提交于 2019-12-27 11:13:09
问题 I have an iframe and i need it to have a scrolling overflow. it seems work out in desktop, i used a work around to make it work in iOS. it works on android and iOS now. however, iOS8 it fails. <html> <body> <style type="text/css"> .scroll-container { overflow: scroll; -webkit-overflow-scrolling: touch; } #iframe_survey { height: 100%; } .scroll-container { height: 100%; width: 100%; overflow: scroll; } </style> <div class="scroll-container scroll-ios"> <iframe id="iframe_survey" src="www

解决iframe高度自适应问题

佐手、 提交于 2019-12-27 05:06:39
最近工作中使用了让人头疼的iframe,碰到的最大问题是没有好的方法使其高度自适应。尤其在页面进行ajax后,后来Google一番之后,发现 iframe-resizer 能够比较好的解决这个问题,而且还支持跨域访问(使用 postMessage )。 iframe resizer地址: https://github.com/davidjbradshaw/iframe-resizer 。 使用方法:在iframe resizer压缩包的js文件夹中,有两个文件: 第一个js是:iframeResizer.min.js。这个js是要放在需要嵌入iframe的页面(parent)中。 第二个js是:iframeResizer.contentWindow.min.js,它需要放到你的iframe页面(child)中去,注意只要引入,不需要代码配置。 然后再parent页面 配置如下:为了兼容需要设置 width:100% scrolling:no overflow:visible <iframe id="myframe" src="https://**" width="100%" scrolling="no" style="overflow:visible"></iframe> 然后再js中使用: <script type="text/javascript"> iFrameResize(

how to get contents from iframe cross domain

佐手、 提交于 2019-12-26 19:42:42
问题 Is there any way to get contents from iframe via php/jQuery or JavaScript? I want to get url when user click on a link in iFrame and its title also. 回答1: From arbitrary URLs? No. From URLs you control? Yes, in modern browsers. The document being clicked in should use postMessage to send whatever data you are interested in to the other document which needs to listen for a message event. top.postMessage({ url: location.href }, "*"); and window.addEventListener("message", receiveMessage, false);

js刷新iframe页面

落爺英雄遲暮 提交于 2019-12-26 16:10:26
jQuery 刷新 iframe 可以使用以下方法: $('#iframe').attr('src', $('#iframe').attr('src')); 此方法适用于刷新iframe的或其他的 来源: CSDN 作者: Missmiaomiao 链接: https://blog.csdn.net/hantanxin/article/details/103715730

iFrame scrolling not working on iOS devices

人盡茶涼 提交于 2019-12-26 10:48:04
问题 I have responsive site which have an issue of scrolling because of iFrame. # Problem > Open site in iPhone in any browser > list of images and video display > Try to scroll down then it's work while images but when video then scrolling not worked because of video display in iFrame and iOS device not allow to scroll on `iFrame`. Is there any CSS trick or any particular issue with iOS devices? It's not work in iPhone / iPad. NOTE: I do not want to scroll into iFrame but page scroll not working

iFrame scrolling not working on iOS devices

两盒软妹~` 提交于 2019-12-26 10:45:17
问题 I have responsive site which have an issue of scrolling because of iFrame. # Problem > Open site in iPhone in any browser > list of images and video display > Try to scroll down then it's work while images but when video then scrolling not worked because of video display in iFrame and iOS device not allow to scroll on `iFrame`. Is there any CSS trick or any particular issue with iOS devices? It's not work in iPhone / iPad. NOTE: I do not want to scroll into iFrame but page scroll not working

iFrame scrolling not working on iOS devices

社会主义新天地 提交于 2019-12-26 10:45:10
问题 I have responsive site which have an issue of scrolling because of iFrame. # Problem > Open site in iPhone in any browser > list of images and video display > Try to scroll down then it's work while images but when video then scrolling not worked because of video display in iFrame and iOS device not allow to scroll on `iFrame`. Is there any CSS trick or any particular issue with iOS devices? It's not work in iPhone / iPad. NOTE: I do not want to scroll into iFrame but page scroll not working

前端跨域

﹥>﹥吖頭↗ 提交于 2019-12-26 10:26:25
跨域是指一个域下的文档或脚本试图去请求另一个域下的资源。也就是说如果协议,域名,或者端口有一个不同就是跨域。 那么为什么要用跨域? 其实是因为浏览器出于安全考虑,我们都知道浏览器有同源策略。如果没有同源策略的情况下,A网站可以被任意来源的Ajax访问到内容,如果当前A网站还处于登录态,那么对方就可以通过Ajax获得A网站的任何消息。当然跨域可以用来房子CSRF攻击,但是并不能完全阻止CSRF。 为什么跨域并不能完全阻止CSRF攻击呢?举个例子: 当请求跨域了,请求是必然发出去的,只是浏览器拦截了响应。你可能会疑问明明通过表单的方式可以发起跨域请求,为什么 Ajax 就不会。因为归根结底,跨域是为了阻止用户读取到另一个域名下的内容,Ajax 可以获取响应,浏览器认为这不安全,所以拦截了响应。但是表单并不会获取新的内容,所以可以发起跨域请求。所以跨域并不能完全阻止 CSRF,因为请求毕竟是发出去了。 上面讲到同源策略,那什么是同源策略呢? 同源策略(SOP)是一种约定,它是浏览器最核心也是最基本的安全功能。浏览器如果缺少同源策略,就会很容易收到xss,csrf等攻击。所谓同源是指“协议+域名+端口”三者相同,即便两个不同的域名指向同一个IP地址,也非同源。 下面来说一下几种方案来解决跨域问题 跨域的方案有: 1、通过jsonp跨域; 2、postMessage跨域; 3、跨域资源共享